]> git.nihav.org Git - nihav.git/blobdiff - src/codecs/mod.rs
avi: skip list chunks correctly
[nihav.git] / src / codecs / mod.rs
index 8ce4e50be0772db6483ec9ef09d07f6d6bea4603..625485e1ed4ed8382c2957b2bc2f4add44863390 100644 (file)
@@ -8,6 +8,7 @@ use io::codebook::CodebookError;
 #[derive(Debug,Clone,Copy,PartialEq)]
 #[allow(dead_code)]
 pub enum DecoderError {
+    NoFrame,
     TryAgain,
     InvalidData,
     ShortData,
@@ -157,7 +158,7 @@ fn write_pgmyuv(pfx: &str, strno: usize, num: u64, frmref: NAFrameRef) {
     let dta = buf.get_data();
     let ls = buf.get_stride(0);
     let mut idx = 0;
-    let mut idx2 = ls;
+    let mut idx2 = w;
     let mut pad: Vec<u8> = Vec::with_capacity((w - w2 * 2) / 2);
     pad.resize((w - w2 * 2) / 2, 0xFF);
     for _ in 0..h {