proper support for linesizes
[nihav.git] / src / codecs / mod.rs
index dd72aeb657f719d2172c4890b41876657d3daa98..625485e1ed4ed8382c2957b2bc2f4add44863390 100644 (file)
@@ -158,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 {