]> git.nihav.org Git - nihav.git/commitdiff
cinepakenc: fix V1-only intra mode
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 15 Jun 2020 12:37:15 +0000 (14:37 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 15 Jun 2020 12:37:15 +0000 (14:37 +0200)
nihav-commonfmt/src/codecs/cinepakenc.rs

index a77e58a4283f9f4010c6dd92783bdf69e5f838f5..882b63701ffa42a29b34f55ad2e6955c02b15a80 100644 (file)
@@ -707,10 +707,10 @@ impl CinepakEncoder {
 
             self.render_stripe(true, start_line, end_line);
 
-            if self.v1_idx.len() == 0 {
+            if self.v4_idx.len() == 0 {
                 bw.write_byte(0x32)?;
-                bw.write_u24be((self.v4_idx.len() + 4) as u32)?;
-                bw.write_buf(self.v4_idx.as_slice())?;
+                bw.write_u24be((self.v1_idx.len() + 4) as u32)?;
+                bw.write_buf(self.v1_idx.as_slice())?;
             } else {
                 bw.write_byte(0x30)?;
                 bw.write_u24be(0)?;