summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Staples <staples255@gmail.com>2017-01-10 09:40:56 -0700
committerSebastian Dröge <sebastian@centricular.com>2017-01-26 15:31:47 +0200
commita8eb0515f1e3b096f978189cfd3cd01d576f390f (patch)
treeda8f42d29f04ba1f11af4a9823b7d850a6b90f36
parenta9056a8a7ee9e5a374c760afe43dff01cda047c1 (diff)
rtspsrc: find_stream_by_channel should ignore unconfigured streams
https://bugzilla.gnome.org/show_bug.cgi?id=777101
-rw-r--r--gst/rtsp/gstrtspsrc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 7725fe16c..35bd8c6cb 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -1339,7 +1339,10 @@ find_stream_by_id (GstRTSPStream * stream, gint * id)
static gint
find_stream_by_channel (GstRTSPStream * stream, gint * channel)
{
- if (stream->channel[0] == *channel || stream->channel[1] == *channel)
+ /* ignore unconfigured channels here (e.g., those that
+ * were explicitly skipped during SETUP) */
+ if ((stream->channelpad[0] != NULL) &&
+ (stream->channel[0] == *channel || stream->channel[1] == *channel))
return 0;
return -1;