From: Kostya Shishkov Date: Thu, 16 May 2019 07:17:48 +0000 (+0200) Subject: core/frame: change simple frame data to slice X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=dc45d8ce2269e638c10a18f99aed3294fd5de827;p=nihav.git core/frame: change simple frame data to slice --- diff --git a/nihav-core/src/frame.rs b/nihav-core/src/frame.rs index 14e5b63..6dfc5eb 100644 --- a/nihav-core/src/frame.rs +++ b/nihav-core/src/frame.rs @@ -268,7 +268,7 @@ pub struct NASimpleVideoFrame<'a, T: Copy> { pub stride: [usize; NA_SIMPLE_VFRAME_COMPONENTS], pub offset: [usize; NA_SIMPLE_VFRAME_COMPONENTS], pub components: usize, - pub data: &'a mut Vec, + pub data: &'a mut [T], } impl<'a, T:Copy> NASimpleVideoFrame<'a, T> { @@ -297,7 +297,7 @@ impl<'a, T:Copy> NASimpleVideoFrame<'a, T> { stride: s, offset: o, components, - data: vbuf.data.as_mut().unwrap(), + data: vbuf.data.as_mut_slice(), }) } }