h263: track first line state too
[nihav.git] / src / codecs / h263 / mod.rs
index c5d63fc0b70017e64c7a0fc7ea09b07933847b0f..7e5064e90769c3d648b617b2b654b3c635bb8360 100644 (file)
@@ -120,6 +120,7 @@ pub struct SliceState {
     pub is_iframe:  bool,
     pub mb_x:       usize,
     pub mb_y:       usize,
+    pub first_line: bool,
 }
 
 const SLICE_NO_END: usize = 99999999;
@@ -141,10 +142,10 @@ impl SliceInfo {
 
 impl SliceState {
     pub fn new(is_iframe: bool) -> Self {
-        SliceState { is_iframe: is_iframe, mb_x: 0, mb_y: 0 }
+        SliceState { is_iframe: is_iframe, mb_x: 0, mb_y: 0, first_line: true }
     }
     pub fn next_mb(&mut self) { self.mb_x += 1; }
-    pub fn new_row(&mut self) { self.mb_x = 0; self.mb_y += 1; }
+    pub fn new_row(&mut self) { self.mb_x = 0; self.mb_y += 1; self.first_line = false; }
 }
 
 #[derive(Debug,Clone,Copy)]