audiolatency: Fix event refcounting bug handling latency events

Fix a refcounting bug introduced in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5146
If upstream returns FALSE when processing a latency event, it will
be unreffed an extra time

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5150>
This commit is contained in:
Jan Schmidt 2023-08-05 01:39:29 +10:00 committed by GStreamer Marge Bot
parent 14503a7d08
commit 8b5833c546

View file

@ -455,7 +455,12 @@ gst_audiolatency_src_probe (GstPad * pad, GstPadProbeInfo * info,
GST_LOG_OBJECT (self,
"Forwarded latency event to sinkpad. Result %d %" GST_PTR_FORMAT, res,
event);
return res ? GST_PAD_PROBE_HANDLED : GST_PAD_PROBE_DROP;
if (!res) {
/* This doesn't actually do anything - pad probe handling ignores
* it, but maybe one day */
GST_PAD_PROBE_INFO_FLOW_RETURN (info) = GST_FLOW_ERROR;
}
return GST_PAD_PROBE_HANDLED;
}
}