uvcsink: fix event peer probe

The only job of the event peer probe is to catch the upcoming caps event
and be able to react with the sink change. All other events that are
passing the pad shall be passed and ignored.

Since the probe is a blocking probe, there is no use in returning
with GST_PAD_PROBE_OK on other events. Otherwise the event would just
be blocked.

Since we are handling the probe removal of the probe already in the
event switch, we can remove the second explicit probe removal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
This commit is contained in:
Michael Grzeschik 2023-06-12 23:31:24 +02:00 committed by GStreamer Marge Bot
parent e3a121950b
commit 17797d1d28

View file

@ -363,11 +363,6 @@ gst_uvc_sink_sinkpad_event_peer_probe (GstPad * pad,
{
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
if (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_DATA (info)) != GST_EVENT_CAPS)
return GST_PAD_PROBE_OK;
gst_pad_remove_probe (pad, GST_PAD_PROBE_INFO_ID (info));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_CAPS:
{