gstreamer: Allow returning Handled from BufferList pad probes

This is handled exactly the same way as buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1174>
This commit is contained in:
Sebastian Dröge 2022-12-23 14:18:17 +02:00 committed by GStreamer Marge Bot
parent dcfea9c35a
commit cdc7aa4846

View file

@ -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