diff --git a/gstreamer-video/src/video_frame.rs b/gstreamer-video/src/video_frame.rs index a65ee9a2b..36aab7da3 100644 --- a/gstreamer-video/src/video_frame.rs +++ b/gstreamer-video/src/video_frame.rs @@ -283,7 +283,11 @@ impl VideoFrame { #[inline] pub fn into_raw(self) -> ffi::GstVideoFrame { - mem::ManuallyDrop::new(self).frame + unsafe { + let mut s = mem::ManuallyDrop::new(self); + ptr::drop_in_place(&mut s.buffer); + s.frame + } } }