mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
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.
This commit is contained in:
parent
ba6d3b5aca
commit
48f7f6b7c2
1 changed files with 3 additions and 3 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue