summaryrefslogtreecommitdiffstats
path: root/gtk/src/hb-backend.c
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/src/hb-backend.c
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/src/hb-backend.c')
-rw-r--r--gtk/src/hb-backend.c21
1 files changed, 6 insertions, 15 deletions
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;
}