mssdemux: ignore unrecognized stream
authorHosang Lee <hosang10.lee@lge.com>
Wed, 17 Jun 2020 01:57:00 +0000 (10:57 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 17 Jun 2020 06:48:18 +0000 (06:48 +0000)
Only create pads for steams with caps that can be recognized
from the fourcc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1348>

ext/smoothstreaming/gstmssdemux.c

index bcea8ca..3e9a375 100644 (file)
@@ -358,6 +358,14 @@ _create_pad (GstMssDemux * mssdemux, GstMssStream * manifeststream)
   GstPad *srcpad = NULL;
   GstMssStreamType streamtype;
   GstPadTemplate *tmpl = NULL;
+  GstCaps *caps = NULL;
+
+  caps = gst_mss_stream_get_caps (manifeststream);
+
+  if (!caps) {
+    GST_WARNING_OBJECT (mssdemux, "not creating pad for unrecognized stream");
+    return NULL;
+  }
 
   streamtype = gst_mss_stream_get_type (manifeststream);
   GST_DEBUG_OBJECT (mssdemux, "Found stream of type: %s",