gstreamer: Set data to null if it's consumed

When the probe has HANDLED the data, we're expecting the caller to no
longer access it. Let's explicitly protect against that by setting the
data to NULL on return.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1537>
This commit is contained in:
Arun Raghavan 2024-09-11 12:12:11 -04:00 committed by Backport Bot
parent 58efcc5fd5
commit e34323cf2a

View file

@ -1045,6 +1045,7 @@ unsafe fn update_probe_info(
|| data_type == Some(Event::static_type()) =>
{
// Buffer or Event consumed by probe
(*info).data = ptr::null_mut();
}
other => panic!("Bad data for {data_type:?} pad probe returning Handled: {other:?}"),
}