diff options
author | jstebbins <[email protected]> | 2015-04-18 17:32:11 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-04-18 17:32:11 +0000 |
commit | 76a228b33e6d2be6a57c025914a1f30c22bc171f (patch) | |
tree | f1ddd58544e314fb2ef886c907db5e44f4e49b7d /gtk | |
parent | d45e9bde808fe440c2dd558c70a6635c478d955b (diff) |
LinGui: Use real sample rate when creating job
The computation of the "best" bitrate was wrong because it requires
the real samplerate and not 0 - "same as source"
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7100 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/hb-backend.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 791f3b678..68c43a816 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -4015,11 +4015,10 @@ ghb_validate_audio(GhbValue *settings, GtkWindow *parent) if (codec == HB_ACODEC_AUTO_PASS) continue; - aconfig = (hb_audio_config_t *) hb_list_audio_config_item( - title->list_audio, track ); - if ( ghb_audio_is_passthru(codec) && + aconfig = hb_list_audio_config_item(title->list_audio, track); + if (ghb_audio_is_passthru(codec) && !(ghb_audio_can_passthru(aconfig->in.codec) && - (aconfig->in.codec & codec))) + (aconfig->in.codec & codec))) { // Not supported. AC3 is passthrough only, so input must be AC3 message = g_strdup_printf( @@ -4103,6 +4102,14 @@ ghb_validate_audio(GhbValue *settings, GtkWindow *parent) ghb_dict_set_string(asettings, "AudioMixdown", hb_mixdown_get_short_name(amixdown)); } + int samplerate = ghb_settings_audio_samplerate_rate(asettings, + "AudioSamplerate"); + if (samplerate == 0) + { + samplerate = aconfig->in.samplerate; + ghb_dict_set_string(asettings, "AudioSamplerate", + ghb_audio_samplerate_get_short_name(samplerate)); + } } return TRUE; } |