From c3ccec67eb42bceacfa64da91f8ee308588c0a79 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 18 Jun 2019 13:30:59 +0530 Subject: [PATCH] video: turn VIDEO_MAX_PLANES to an usize More convenient to use. --- gstreamer-video/src/video_info.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index a9398cbf7..cfccde5ad 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -23,7 +23,7 @@ use std::mem; use std::ptr; use std::str; -pub const VIDEO_MAX_PLANES: u32 = gst_video_sys::GST_VIDEO_MAX_PLANES as u32; +pub const VIDEO_MAX_PLANES: usize = gst_video_sys::GST_VIDEO_MAX_PLANES as usize; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum VideoColorRange { @@ -945,7 +945,7 @@ mod tests { assert_eq!(info.stride(), [1920, 1920]); assert_eq!(info.offset(), [0, 2073600]); - let mut align = ::VideoAlignment::new(0, 0, 0, 8, &[0; VIDEO_MAX_PLANES as usize]); + let mut align = ::VideoAlignment::new(0, 0, 0, 8, &[0; VIDEO_MAX_PLANES]); assert!(info.align(&mut align)); assert_eq!(info.stride(), [1928, 1928]);