]> git.nihav.org Git - nihav.git/commitdiff
support Flic in MOV master
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 27 Nov 2026 16:10:54 +0000 (17:10 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 27 Nov 2026 16:10:54 +0000 (17:10 +0100)
nihav-commonfmt/src/demuxers/mov/track.rs
nihav-registry/src/register.rs

index 9ebcb3a0c2c755619d97181e24103eab9905962a..92e937c465454a4a224df113e615bd335c7acaa8 100644 (file)
@@ -356,9 +356,12 @@ fn read_stsd(track: &mut Track, br: &mut dyn ByteIO, size: u64) -> DemuxerResult
                 let depth           = br.read_u16be()?;
                 let ctable_id       = br.read_u16be()?;
                 let grayscale = depth > 0x20 || depth == 1;
-                let depth = if grayscale { depth & 0x1F } else { depth };
+                let mut depth = if grayscale { depth & 0x1F } else { depth };
                 if ctable_id == 0 {
                     let max_pal_size = start_pos + size - br.tell();
+                    if depth == 24 && max_pal_size > 16 && &fcc == b"flic" {
+                        depth = 8;
+                    }
                     if depth <= 8 {
                         let mut pal = [0; 1024];
                         read_palette(br, max_pal_size, &mut pal)?;
index ef3f542ad41a0138ec1268bc9baf7a01a67f8712..d98141e55610887809967279b76f418082cd0449 100644 (file)
@@ -483,6 +483,7 @@ static MOV_VIDEO_CODEC_REGISTER: &[(&[u8;4], &str)] = &[
     (b"SVQ3", "sorenson-video3"),
     (b"svq3", "sorenson-video3"),
     (b"gif ", "qt-gif"),
+    (b"flic", "flic"),
 
     (b"msvc", "msvideo1"),