urisourcebin: Also use event probe for HLS use-cases
authorEdward Hervey <edward@centricular.com>
Mon, 4 Nov 2024 08:21:44 +0000 (09:21 +0100)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Fri, 8 Nov 2024 14:49:27 +0000 (14:49 +0000)
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3957

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7857>

subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c

index bf8ba01ec0341c15e849763b21f8a660ee935a9e..d64c69099efe9625a9cdc3cdd76016fcb5f3722e 100644 (file)
@@ -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);
   }