core/frame: drop unneeded mut
[nihav.git] / nihav-core / src / frame.rs
index 70a054d3655842788839385122f1d8f2a2bc6b98..7a09be4c25dfb5076962e18675dd2106ad133226 100644 (file)
@@ -168,7 +168,7 @@ impl<T: Clone> NAVideoBuffer<T> {
     /// Returns the number of components in picture format.
     pub fn get_num_components(&self) -> usize { self.offs.len() }
     /// Creates a copy of current `NAVideoBuffer`.
-    pub fn copy_buffer(&mut self) -> Self {
+    pub fn copy_buffer(&self) -> Self {
         let mut data: Vec<T> = Vec::with_capacity(self.data.len());
         data.clone_from(self.data.as_ref());
         let mut offs: Vec<usize> = Vec::with_capacity(self.offs.len());
@@ -1357,7 +1357,7 @@ impl NAStream {
         self.tb_den = d;
     }
     /// Returns stream duration.
-    pub fn get_duration(&self) -> usize { self.num }
+    pub fn get_duration(&self) -> u64 { self.duration }
     /// Converts current instance into a reference-counted one.
     pub fn into_ref(self) -> NAStreamRef { Arc::new(self) }
 }