From 0f48e9472bcd323066d3b0550d2f8022b738465e Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 14 Jun 2017 14:22:04 +0300 Subject: [PATCH] frame/video: make plane_height() public --- src/util/frame/video.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/frame/video.rs b/src/util/frame/video.rs index aa17772..91ceb7e 100644 --- a/src/util/frame/video.rs +++ b/src/util/frame/video.rs @@ -245,7 +245,12 @@ impl Video { 8 } - fn plane_height(&self, index: usize) -> u32 { + #[inline] + pub fn plane_height(&self, index: usize) -> u32 { + if index >= self.planes() { + panic!("out of bounds"); + } + // Logic taken from av_image_fill_pointers(). if index != 1 && index != 2 { return self.height();