From 09be1ab863df1b2833458f13bd6849eeb2a51968 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 4 Nov 2024 09:21:44 +0100 Subject: [PATCH] urisourcebin: Also use event probe for HLS use-cases Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3957 Part-of: --- .../gst-plugins-base/gst/playback/gsturisourcebin.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c index bf8ba01ec0..d64c69099e 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c @@ -1357,6 +1357,14 @@ new_output_slot (ChildSrcPadInfo * info, GstPad * originating_pad) gst_pad_link (originating_pad, slot->queue_sinkpad); } else { + if (info->demuxer) { + /* Make sure we add the event probe *before* linking */ + slot->demuxer_event_probe_id = + gst_pad_add_probe (originating_pad, + GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_FLUSH, + (GstPadProbeCallback) demux_pad_events, slot, NULL); + } + /* Expose pad directly */ slot->output_pad = create_output_pad (slot, originating_pad); }