summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-10-06 23:26:21 +0000
committerjstebbins <[email protected]>2010-10-06 23:26:21 +0000
commit3efb2c16054f66a9e0b01905d0a6116c0b2df43c (patch)
treeb0ba31bf3a45157f290a7a116015c326d1c9438e /gtk
parent0e2bd81fff72c226f073d27ae8b22530e932c20e (diff)
LinGui: remove more duplicate code relating to min/max audio bitrates
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3576 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/audiohandler.c4
-rw-r--r--gtk/src/hb-backend.c21
2 files changed, 8 insertions, 17 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index 78d405fd8..6ca014895 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -99,10 +99,10 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud)
}
else
{
- ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(384));
ghb_ui_update(ud, "AudioSamplerate", ghb_int64_value(0));
ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(0));
- select_acodec = HB_ACODEC_AC3;
+ bitrate = 448;
+ mix = ghb_get_best_mix( titleindex, track, select_acodec, 0);
}
ghb_ui_update(ud, "AudioTrackDRCSlider", ghb_double_value(0));
}
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 20ced8f69..5f8347858 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1656,22 +1656,13 @@ ghb_find_closest_audio_bitrate(gint codec, gint rate)
gint
ghb_get_best_audio_bitrate(gint acodec, gint br, gint channels)
{
- if (acodec & HB_ACODEC_FAAC)
- {
- int maxbr;
+ int low, high;
- if (channels == 2)
- maxbr = 320;
- else
- maxbr = 768;
- if (br > maxbr)
- br = maxbr;
- }
- if (acodec & HB_ACODEC_AC3)
- {
- if (br > 640)
- br = 640;
- }
+ ghb_get_audio_bitrate_limits(acodec, channels, &low, &high);
+ if (br > high)
+ br = high;
+ if (br < low)
+ br = low;
br = ghb_find_closest_audio_bitrate(acodec, br);
return br;
}