rtspsrc: Ignore medias marked as sendonly
authorSebastian Dröge <sebastian@centricular.com>
Sun, 1 Oct 2017 14:09:13 +0000 (16:09 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Sun, 1 Oct 2017 14:09:13 +0000 (16:09 +0200)
We're never going to receive anything from them, so don't create pads
for them. These medias are destinations where *we* could send something.

gst/rtsp/gstrtspsrc.c

index 7b52e52..976d18c 100644 (file)
@@ -1606,6 +1606,9 @@ gst_rtspsrc_collect_payloads (GstRTSPSrc * src, const GstSDPMessage * sdp,
   else
     goto unknown_proto;
 
+  if (gst_sdp_media_get_attribute_val (media, "sendonly") != NULL)
+    goto sendonly_media;
+
   /* Parse global SDP attributes once */
   global_caps = gst_caps_new_empty_simple ("application/x-unknown");
   GST_DEBUG ("mapping sdp session level attributes to caps");
@@ -1675,6 +1678,11 @@ unknown_proto:
     GST_ERROR_OBJECT (src, "unknown proto in media: '%s'", proto);
     return;
   }
+sendonly_media:
+  {
+    GST_DEBUG_OBJECT (src, "sendonly media ignored");
+    return;
+  }
 }
 
 static const gchar *