From 41017e6c3456a027b775d8fa1c5c07ecc851a669 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 30 Nov 2022 09:26:48 +0100 Subject: [PATCH] uridecodebin3: Always store pending buffering messages Fixes #1586 Part-of: --- .../gst-plugins-base/gst/playback/gsturidecodebin3.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c index d599da6e2b..74b72ac2c6 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c @@ -1998,10 +1998,14 @@ gst_uri_decode_bin3_handle_message (GstBin * bin, GstMessage * msg) PLAY_ITEMS_LOCK (uridecodebin); /* Find the matching handler (if any) */ handler = find_source_handler_for_element (uridecodebin, msg->src); - if (!handler || !uridecodebin->input_item->main_item) { + if (!handler) { + GST_LOG_OBJECT (uridecodebin, "No handler for message, dropping it"); gst_message_unref (msg); msg = NULL; - } else if (handler != uridecodebin->input_item->main_item->handler) { + } else if (!uridecodebin->input_item->main_item + || handler != uridecodebin->input_item->main_item->handler) { + GST_LOG_OBJECT (uridecodebin, + "Handler isn't active input item, storing message"); /* Store the message for a later time */ if (handler->pending_buffering_msg) gst_message_unref (handler->pending_buffering_msg);