]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix lame bitrate maxing out at 160
authorjstebbins <jstebbins.hb@gmail.com>
Sat, 15 Oct 2011 16:15:19 +0000 (16:15 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sat, 15 Oct 2011 16:15:19 +0000 (16:15 +0000)
Must set the samplerate before trying to validate maximum bitrate.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4290 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/hb-backend.c

index ea817b7ff7ad22616274098b7b233908d45d1390..03fb954a599c2718fa9086ccb973a09ec3c9af6d 100644 (file)
@@ -4915,6 +4915,11 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
                        // Make sure the mixdown is valid and pick a new one if not.
                        audio.out.mixdown = ghb_get_best_mix(aconfig, audio.out.codec, 
                                                                                                        audio.out.mixdown);
+                       gint srate = ghb_settings_combo_int(asettings, "AudioSamplerate");
+                       if (srate == 0) // 0 is same as source
+                               audio.out.samplerate = aconfig->in.samplerate;
+                       else
+                               audio.out.samplerate = srate;
                        double quality = ghb_settings_get_double(asettings, "AudioTrackQuality");
                        if (ghb_settings_get_boolean(asettings, "AudioTrackQualityEnable") &&
                                quality >= 0)
@@ -4932,11 +4937,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
                                        audio.out.codec, audio.out.bitrate, 
                                        audio.out.samplerate, audio.out.mixdown);
                        }
-                       gint srate = ghb_settings_combo_int(asettings, "AudioSamplerate");
-                       if (srate == 0) // 0 is same as source
-                               audio.out.samplerate = aconfig->in.samplerate;
-                       else
-                               audio.out.samplerate = srate;
                }
 
                // Add it to the jobs audio list