OSDN Git Service

LinGui: fix initial audio selection problem
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 19 Oct 2008 18:43:08 +0000 (18:43 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 19 Oct 2008 18:43:08 +0000 (18:43 +0000)
if no source audios matched the preset's language criteria, then no
audio was being selected.

git-svn-id: svn://localhost/HandBrake/trunk@1849 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/hb-backend.c

index 98c27dc..e45ce65 100644 (file)
@@ -1612,6 +1612,9 @@ ghb_find_audio_track(gint titleindex, const gchar *lang, gint index)
                        match++;
                }
        }
+       if (match) return track;
+       if (index < count)
+               track = index;
        return track;
 }