]> git.nihav.org Git - nihav.git/commitdiff
core/frame: change simple frame data to slice
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 16 May 2019 07:17:48 +0000 (09:17 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 16 May 2019 07:17:48 +0000 (09:17 +0200)
nihav-core/src/frame.rs

index 14e5b63a284902a73fef97238291d098acf024ec..6dfc5eb98d50a665963d388e75d99ae2c6163be4 100644 (file)
@@ -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<T>,
+    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(),
             })
     }
 }