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/1448>
This commit is contained in:
Arun Raghavan 2024-09-11 12:12:11 -04:00 committed by GStreamer Marge Bot
parent 224215a844
commit f14efbd70c

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:?}"),
}