cinepakenc: fix detection of codebook changed part
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 23 Feb 2023 16:53:43 +0000 (17:53 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 23 Feb 2023 16:53:43 +0000 (17:53 +0100)
nihav-commonfmt/src/codecs/cinepakenc.rs

index 4729cd6050fb3f4a228ad20064189f597f78dfa6..28f9c9309e4f60ced7e1774ad59462775540d0b8 100644 (file)
@@ -391,7 +391,7 @@ impl CinepakEncoder {
             }
         } else {
             let mut end = 256;
-            for (i, (ncw, ocw)) in new_cb.iter().rev().zip(old_cb.iter().rev()).enumerate() {
+            for (i, (ncw, ocw)) in new_cb.iter().zip(old_cb.iter()).enumerate().rev() {
                 if ncw == ocw {
                     end = i;
                 } else {