uridecodebin3: Always store pending buffering messages

Fixes #1586

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3487>
This commit is contained in:
Edward Hervey 2022-11-30 09:26:48 +01:00 committed by GStreamer Marge Bot
parent 901ad2b4f5
commit 41017e6c34

View file

@ -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);