From 48f7f6b7c290e73e202860c4e2d9649fbe870cd4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 16 Mar 2009 16:42:18 +0100 Subject: [PATCH] playbin2: don't try to set invalid stream numbers Fix a problem with setting the stream numbers because we check for the wrong range. See #575239. --- gst/playback/gstplaybin2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index e04aae6e2e..790cec6e58 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -1253,7 +1253,7 @@ gst_play_bin_set_current_video_stream (GstPlayBin * playbin, gint stream) if (!(channels = group->video_channels)) goto no_channels; - if (stream == -1 || channels->len < stream) { + if (stream == -1 || channels->len <= stream) { sinkpad = NULL; } else { /* take channel from selected stream */ @@ -1295,7 +1295,7 @@ gst_play_bin_set_current_audio_stream (GstPlayBin * playbin, gint stream) if (!(channels = group->audio_channels)) goto no_channels; - if (stream == -1 || channels->len < stream) { + if (stream == -1 || channels->len <= stream) { sinkpad = NULL; } else { /* take channel from selected stream */ @@ -1337,7 +1337,7 @@ gst_play_bin_set_current_text_stream (GstPlayBin * playbin, gint stream) if (!(channels = group->text_channels)) goto no_channels; - if (stream == -1 || channels->len < stream) { + if (stream == -1 || channels->len <= stream) { sinkpad = NULL; } else { /* take channel from selected stream */