From 17797d1d281d56f03200a9080caf4bb5a76b1047 Mon Sep 17 00:00:00 2001 From: Michael Grzeschik Date: Mon, 12 Jun 2023 23:31:24 +0200 Subject: [PATCH] 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: --- subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c b/subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c index 52ac67af9f..5edd59044d 100644 --- a/subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c +++ b/subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c @@ -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: {