From 6c830c5bd34116f36590b013ff9ca123cc6785b2 Mon Sep 17 00:00:00 2001 From: Elliot Chen Date: Fri, 27 Sep 2024 19:45:06 +0900 Subject: [PATCH] decodebin3: check and send selected stream message even if no decoder is selected Part-of: --- .../gst/playback/gstdecodebin3.c | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index 78b79c776b..5af4a8d276 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -3172,20 +3172,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