urisourcebin: Only allow streams-aware adaptive demuxer
authorEdward Hervey <edward@centricular.com>
Wed, 26 Oct 2022 05:04:52 +0000 (07:04 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 16 Nov 2022 14:01:46 +0000 (14:01 +0000)
We no longer want to deal with elements that use the old-style of stream
switching and instead expose/remove streams as they appear/disappear

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>

subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c

index 68f2da1..cc71a58 100644 (file)
@@ -1876,6 +1876,11 @@ make_demuxer (GstURISourceBin * urisrc, GstCaps * caps)
       continue;
 
     demuxer = gst_element_factory_create (factory, NULL);
+    if (!GST_OBJECT_FLAG_IS_SET (demuxer, GST_BIN_FLAG_STREAMS_AWARE)) {
+      GST_DEBUG_OBJECT (urisrc, "Ignoring non-streams-aware adaptive demuxer");
+      gst_object_unref (demuxer);
+      continue;
+    }
     break;
   }
   gst_plugin_feature_list_free (eligible);