forked from mirrors/gstreamer-rs
Ignore false clippy warning about casting and pointer alignment in videometa
error: casting from `*mut ffi::GstVideoOverlayComposition` to a more-strictly-aligned pointer (`*mut gst_ffi::GstMiniObject`) --> gstreamer-video/src/video_meta.rs:158:44 | 158 | gst_ffi::gst_mini_object_unref(self.0.overlay as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[deny(clippy::cast_ptr_alignment)] on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment error: casting from `*mut ffi::GstVideoOverlayComposition` to a more-strictly-aligned pointer (`*mut gst_ffi::GstMiniObject`) --> gstreamer-video/src/video_meta.rs:159:59 | 159 | self.0.overlay = gst_ffi::gst_mini_object_ref(overlay.as_mut_ptr() as *mut _) as *mut _; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment
This commit is contained in:
parent
8c3df63b95
commit
e7b4bafa60
1 changed files with 1 additions and 0 deletions
|
@ -154,6 +154,7 @@ impl VideoOverlayCompositionMeta {
|
|||
}
|
||||
|
||||
pub fn set_overlay(&mut self, overlay: &::VideoOverlayComposition) {
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
|
||||
unsafe {
|
||||
gst_ffi::gst_mini_object_unref(self.0.overlay as *mut _);
|
||||
self.0.overlay = gst_ffi::gst_mini_object_ref(overlay.as_mut_ptr() as *mut _) as *mut _;
|
||||
|
|
Loading…
Reference in a new issue