From 99748f4b7308a892bfdab1f14ffa4d9e4e436e19 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Wed, 18 Nov 2009 19:39:05 +0000 Subject: 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 --- gtk/src/hb-backend.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'gtk/src/hb-backend.c') diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 5d43d469e..7ac71720b 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -2677,7 +2677,11 @@ audio_bitrate_opts_add(GtkBuilder *builder, const gchar *name, gint rate) } static void -audio_bitrate_opts_clean(GtkBuilder *builder, const gchar *name, gint last_rate) +audio_bitrate_opts_clean( + GtkBuilder *builder, + const gchar *name, + gint first_rate, + gint last_rate) { GtkTreeIter iter; GtkListStore *store; @@ -2685,6 +2689,7 @@ audio_bitrate_opts_clean(GtkBuilder *builder, const gchar *name, gint last_rate) gboolean done = FALSE; gint ii = 0; guint last = (guint)last_rate; + guint first = (guint)first_rate; g_debug("audio_bitrate_opts_clean ()\n"); store = get_combo_box_store(builder, name); @@ -2698,7 +2703,7 @@ audio_bitrate_opts_clean(GtkBuilder *builder, const gchar *name, gint last_rate) { done = !gtk_list_store_remove(store, &iter); } - else if (ivalue > last) + else if (ivalue < first || ivalue > last) { ii++; gtk_list_store_set(store, &iter, 1, FALSE, -1); @@ -2748,9 +2753,12 @@ ghb_set_passthru_bitrate_opts(GtkBuilder *builder, gint bitrate) } void -ghb_set_default_bitrate_opts(GtkBuilder *builder, gint last_rate) +ghb_set_default_bitrate_opts( + GtkBuilder *builder, + gint first_rate, + gint last_rate) { - audio_bitrate_opts_clean(builder, "AudioBitrate", last_rate); + audio_bitrate_opts_clean(builder, "AudioBitrate", first_rate, last_rate); } static ghb_status_t hb_status; -- cgit v1.2.3