]> git.nihav.org Git - nihav.git/commitdiff
avi: remove useless cast
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 2 Mar 2026 17:06:42 +0000 (18:06 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 2 Mar 2026 17:06:42 +0000 (18:06 +0100)
nihav-commonfmt/src/demuxers/avi.rs

index 0df1423de8a5c7d196da0f20332e697236628670..3c6a5cc0aaa5598333ff19a532d5cf268e66220a 100644 (file)
@@ -138,7 +138,7 @@ impl AVIStream {
             if header.colors > 0 {
                 if let Some(ref buf) = edata {
                     let mut pal = [0u8; 1024];
-                    for (dpal, spal) in pal.chunks_mut(4).take(header.colors as usize).zip(buf.chunks(4)) {
+                    for (dpal, spal) in pal.chunks_mut(4).take(header.colors).zip(buf.chunks(4)) {
                         dpal[0] = spal[2];
                         dpal[1] = spal[1];
                         dpal[2] = spal[0];