summaryrefslogtreecommitdiffstats
path: root/gtk/src/audiohandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-11-24 04:08:41 +0000
committerjstebbins <[email protected]>2009-11-24 04:08:41 +0000
commit980a31be4e0dae47cb0f7fa600b4ef51dd4fbcf1 (patch)
tree3703705ad5fafe7bb10bdecce5d953f563c9bae4 /gtk/src/audiohandler.c
parent156acb8d52d8e517a1b4745396ddcea687472ccb (diff)
LinGui: make smarter bitrate choice when automatically selecting audio settings
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2967 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/audiohandler.c')
-rw-r--r--gtk/src/audiohandler.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index fbe5e90c7..935d961c5 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -52,10 +52,17 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud)
{
gint br = ainfo.bitrate / 1000;
// Set the values for bitrate and samplerate to the input rates
- if (br >= 8)
+ if (br < 8)
+ br = 160;
+ if (ghb_audio_is_passthru (ainfo.codec))
+ {
ghb_set_passthru_bitrate_opts (ud->builder, br);
+ }
else
- br = 160;
+ {
+ acodec = ghb_select_audio_codec(ud, audioindex);
+ br = ghb_find_closest_audio_bitrate(acodec, br);
+ }
ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(br));
ghb_ui_update(ud, "AudioSamplerate", ghb_int64_value(0));
ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(0));