summaryrefslogtreecommitdiffstats
path: root/gtk/src/audiohandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-11-18 19:39:05 +0000
committerjstebbins <[email protected]>2009-11-18 19:39:05 +0000
commit99748f4b7308a892bfdab1f14ffa4d9e4e436e19 (patch)
tree467d888474d298f42c58ada3b032ce1da8bd53de /gtk/src/audiohandler.c
parentfc45fb323ef56083c6a8753b6332b84b5faaf0fe (diff)
LinGui: set minimum bitrate to 192kbps when codec is faac and mix is 6-ch
If you ask faac for less than 192kbps with 6ch audio, you will get 192 anyway. This throws off target size estimates if target size was used. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2941 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/audiohandler.c')
-rw-r--r--gtk/src/audiohandler.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index 39d54c109..fbe5e90c7 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -47,7 +47,7 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud)
if (ghb_audio_is_passthru (acodec))
{
- ghb_set_default_bitrate_opts (ud->builder, -1);
+ ghb_set_default_bitrate_opts (ud->builder, 0, -1);
if (ghb_get_audio_info (&ainfo, titleindex, audioindex))
{
gint br = ainfo.bitrate / 1000;
@@ -70,12 +70,13 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud)
}
else if (acodec == HB_ACODEC_FAAC)
{
- gint br, last;
+ gint br, last = 160, first = 0;
if (mix == HB_AMIXDOWN_6CH)
+ {
+ first = 192;
last = 448;
- else
- last = 160;
+ }
widget = GHB_WIDGET(ud->builder, "AudioBitrate");
gval = ghb_widget_value(widget);
@@ -83,11 +84,13 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud)
ghb_value_free(gval);
if (br > last)
ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(last));
- ghb_set_default_bitrate_opts (ud->builder, last);
+ if (br < first)
+ ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(first));
+ ghb_set_default_bitrate_opts (ud->builder, first, last);
}
else
{
- ghb_set_default_bitrate_opts (ud->builder, -1);
+ ghb_set_default_bitrate_opts (ud->builder, 0, -1);
}
}