GNOME Bugzilla – Bug 734342
pad: allow probes to remove the data item whilst returning PROBE_OK
Last modified: 2015-04-02 23:12:26 UTC
Created attachment 282644 [details] [review] pad: allow probes to remove the data item whilst returning PROBE_OK If we just replace the data item in a probe info structure with NULL without returning PROBE_DROP, GStreamer ends up sending a NULL buffer/event to the next element. Arguably this should work, and unfortunately the ProbeReturn isn't a flag but a simple enum. Use case: we want to block the source pad of a leaky queue and drop the buffer that causes the block. If we return PROBE_DROP then the buffer gets dropped, but we get called again. If we return PROBE_OK we can't easily drop the buffer. If we just replace the item into the GstPadProbeInfo structure with NULL, GStreamer will push a NULL buffer to the next element when we unblock the pad probe. This patch ensures it doesn't do that.
Ping.
Thanks, thought I'd pushed that ages ago. commit 5deb4f658e1673c38364fc6277a4e26df5a60609 Author: Tim-Philipp Müller <tim@centricular.com> Date: Wed Aug 6 10:32:39 2014 +0100 pad: allow probes to remove the data item whilst returning PROBE_OK Use case: we want to block the source pad of a leaky queue and drop the buffer that causes the block. If we return PROBE_DROP then the buffer gets dropped, but we get called again. If we return PROBE_OK we can't easily drop the buffer. If we just replace the item into the GstPadProbeInfo structure with NULL, GStreamer will push a NULL buffer to the next element when we unblock the pad probe. This patch ensures it doesn't do that. https://bugzilla.gnome.org/show_bug.cgi?id=734342