From 80e7c3151482f860e03345843c371442491a36c1 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 29 Dec 2022 16:01:07 +0100 Subject: [PATCH] uridecodebin3: Avoid repeatedly calling the blocking probe When skipping an event, we want to unref it and say we handled it. This avoids being repeatedly called for the same (sticky) events. The events will be properly propagated once the pad is linked. Part-of: --- subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c index 56553c5..02ce055 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c @@ -1232,7 +1232,10 @@ uri_src_block_probe (GstPad * pad, GstPadProbeInfo * info, } } GST_LOG_OBJECT (pad, "Skiping %" GST_PTR_FORMAT, event); - return GST_PAD_PROBE_DROP; + /* We don't want to be repeatedly called for the same event when unlinked, + * so we mark the event as handled */ + gst_mini_object_unref (GST_PAD_PROBE_INFO_DATA (info)); + return GST_PAD_PROBE_HANDLED; } PLAY_ITEMS_LOCK (handler->uridecodebin); -- 2.7.4