decodebin3: check and send selected stream message even if no decoder is selected
authorElliot Chen <elliot.chen@nxp.com>
Fri, 27 Sep 2024 10:45:06 +0000 (19:45 +0900)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Wed, 2 Oct 2024 11:59:54 +0000 (12:59 +0100)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7601>

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

index d8ba5fa052fd104aeaceb4d9abdb4d87a47caf90..65c2c970e7fc0b689920de8d7f80f9a0db59b05a 100644 (file)
@@ -3329,20 +3329,23 @@ mq_slot_check_reconfiguration (MultiQueueSlot * slot)
     SELECTION_UNLOCK (dbin);
     if (msg)
       gst_element_post_message ((GstElement *) slot->dbin, msg);
-    if (no_more_streams)
+    if (no_more_streams) {
       GST_ELEMENT_ERROR (slot->dbin, CORE, MISSING_PLUGIN, (NULL),
           ("No suitable plugins found"));
-    else
-      GST_ELEMENT_WARNING (slot->dbin, CORE, MISSING_PLUGIN, (NULL),
-          ("Some plugins were missing"));
-  } else {
-    GstMessage *selection_msg = is_selection_done (dbin);
-    /* All good, we reconfigured the associated output. Check if we're done with
-     * the current selection */
-    SELECTION_UNLOCK (dbin);
-    if (selection_msg)
-      gst_element_post_message ((GstElement *) slot->dbin, selection_msg);
+      return;
+    }
+
+    GST_ELEMENT_WARNING (slot->dbin, CORE, MISSING_PLUGIN, (NULL),
+        ("Some plugins were missing"));
+    SELECTION_LOCK (dbin);
   }
+
+  GstMessage *selection_msg = is_selection_done (dbin);
+  /* We reconfigured the associated output. Check if we're done with
+   * the current selection */
+  SELECTION_UNLOCK (dbin);
+  if (selection_msg)
+    gst_element_post_message ((GstElement *) slot->dbin, selection_msg);
 }
 
 static void