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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3658>
This commit is contained in:
Edward Hervey 2022-12-29 16:01:07 +01:00 committed by Edward Hervey
parent a0655d5131
commit 80e7c31514

View file

@ -1232,7 +1232,10 @@ uri_src_block_probe (GstPad * pad, GstPadProbeInfo * info,
} }
} }
GST_LOG_OBJECT (pad, "Skiping %" GST_PTR_FORMAT, event); 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); PLAY_ITEMS_LOCK (handler->uridecodebin);