]> git.nihav.org Git - nihav.git/commitdiff
movmuxer: fix writing low-bit palette
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 26 Apr 2026 18:27:12 +0000 (20:27 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 26 Apr 2026 18:27:12 +0000 (20:27 +0200)
nihav-commonfmt/src/muxers/mov/videotrack.rs

index 3993a78bef225e7834a0ab57bf11bad755e2ea29..77ffd597a52d93e832572f05cf61194146ce669f 100644 (file)
@@ -138,7 +138,7 @@ impl TrackHandler for VideoTrackHandler {
         }
         //xxx: detect greyscale?
         bw.write_u16be(u16::from(bpp))?;
-        if bpp == 8 {
+        if bpp <= 8 {
             if let Some(ref pal) = self.pal {
                 let pal_bpp = self.vinfo.bits.min(8);
                 static DEFAULT_PALS: &[(u8, &[u8])] = &[(8, &MOV_DEFAULT_PAL_8BIT), (4, &MOV_DEFAULT_PAL_4BIT), (2, &MOV_DEFAULT_PAL_2BIT)];