From 7f1c5e2ef31db51513dcc3ea393237f916a3e6f5 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 17 Mar 2023 09:58:55 +0100 Subject: [PATCH] urisourcebin: Propagate sticky events from parsebin If sticky events are present on parsebin source pads, we propagate them to the multiqueue source pads. Those will be propagated on the new urisourcebin source pads like in the other code paths. This ensures that STREAM_START event are present on new source pads. If CAPS event are also present (not guaranteed), they will also be available. Fixes #2384 Part-of: --- subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c index 9a78c3d6ff..d612935534 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c @@ -663,7 +663,9 @@ copy_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data) { GstPad *gpad = GST_PAD_CAST (user_data); - GST_DEBUG_OBJECT (gpad, "store sticky event %" GST_PTR_FORMAT, *event); + GST_DEBUG_OBJECT (gpad, + "store sticky event from %" GST_PTR_FORMAT " %" GST_PTR_FORMAT, pad, + *event); gst_pad_store_sticky_event (gpad, *event); return TRUE; @@ -1125,6 +1127,7 @@ new_output_slot (ChildSrcPadInfo * info, GstPad * originating_pad) slot->queue_sinkpad = gst_element_request_pad_simple (info->multiqueue, "sink_%u"); srcpad = gst_pad_get_single_internal_link (slot->queue_sinkpad); + gst_pad_sticky_events_foreach (originating_pad, copy_sticky_events, srcpad); slot->output_pad = create_output_pad (slot, srcpad); gst_object_unref (srcpad); gst_pad_link (originating_pad, slot->queue_sinkpad);