mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
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:
parent
58efcc5fd5
commit
e34323cf2a
1 changed files with 1 additions and 0 deletions
|
@ -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:?}"),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue