From 430abb1e9d7dffb11b259e6373d17a5100297c37 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Sun, 3 Jan 2021 21:36:27 +0100 Subject: [PATCH] video/video_rectangle: Implement glib::translate::Uninitialized The new Vulkan bindings require this. --- gstreamer-video/src/video_rectangle.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gstreamer-video/src/video_rectangle.rs b/gstreamer-video/src/video_rectangle.rs index 378ca66d1..a1777ca0e 100644 --- a/gstreamer-video/src/video_rectangle.rs +++ b/gstreamer-video/src/video_rectangle.rs @@ -1,6 +1,7 @@ // Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::IntoGlib; +use std::mem; #[derive(Clone, Debug, Eq, PartialEq, Hash)] pub struct VideoRectangle { @@ -46,3 +47,10 @@ pub fn center_video_rectangle( } VideoRectangle::new(result.x, result.y, result.w, result.h) } + +#[doc(hidden)] +impl glib::translate::Uninitialized for VideoRectangle { + unsafe fn uninitialized() -> Self { + mem::zeroed() + } +}