decodebin3: Prevent a critical warning when reassigning output slots
authorPhilippe Normand <philn@igalia.com>
Tue, 18 Jul 2023 14:15:40 +0000 (15:15 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 19 Jul 2023 11:48:40 +0000 (11:48 +0000)
Do not attempt to send a streams-selected message when reassigning
an output slot in case upstream signalled that it is handling stream selection.
In this case decodebin3 doesn't keep track of stream
collections (`dbin->collection` is NULL).

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

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

index ebe749b..e67a079 100644 (file)
@@ -2218,6 +2218,11 @@ is_selection_done (GstDecodebin3 * dbin)
 
   GST_LOG_OBJECT (dbin, "Checking");
 
+  if (dbin->upstream_selected) {
+    GST_DEBUG ("Upstream handles stream selection, returning");
+    return NULL;
+  }
+
   if (dbin->to_activate != NULL) {
     GST_DEBUG ("Still have streams to activate");
     return NULL;