Commit 48f7f6b7 authored by Wim Taymans's avatar Wim Taymans
Browse files

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.
parent ba6d3b5a
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment