From cdc7aa4846569da9db40a8c322377401c232eb91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 23 Dec 2022 14:18:17 +0200 Subject: [PATCH] gstreamer: Allow returning `Handled` from `BufferList` pad probes This is handled exactly the same way as buffers. Part-of: --- gstreamer/src/pad.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index 3850a05fc..64776210e 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -1142,7 +1142,7 @@ unsafe fn update_probe_info( ) { if ret == PadProbeReturn::Handled { // Handled queries need to be returned - // Handled buffers are consumed + // Handled buffers and buffer lists are consumed // No other types can safely be used here match probe_info.data { @@ -1154,11 +1154,16 @@ unsafe fn update_probe_info( assert_eq!(data_type, Some(Buffer::static_type())); // Buffer not consumed by probe; consume it here } + Some(PadProbeData::BufferList(_)) => { + assert_eq!(data_type, Some(BufferList::static_type())); + // BufferList not consumed by probe; consume it here + } Some(PadProbeData::Event(_)) => { assert_eq!(data_type, Some(Event::static_type())); // Event not consumed by probe; consume it here } None if data_type == Some(Buffer::static_type()) + || data_type == Some(BufferList::static_type()) || data_type == Some(Event::static_type()) => { // Buffer or Event consumed by probe