]> git.nihav.org Git - nihav.git/commitdiff
mov: use sample size in get_size() if possible
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 20 Feb 2026 17:58:00 +0000 (18:58 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 20 Feb 2026 17:58:00 +0000 (18:58 +0100)
nihav-commonfmt/src/demuxers/mov.rs

index 0d7799e4268334bdb83237a6f1bfed89a9df9940..db2b3bd32b232f7041fcaa22594ba45d10feed64 100644 (file)
@@ -1498,7 +1498,7 @@ impl Track {
             self.chunk_sizes[sample_no] as usize
         } else if self.stream_type != StreamType::Audio && self.sample_map.len() <= 1 && self.bsize > 0 {
             self.bsize
-        } else if !self.sample_map.is_empty() {
+        } else if !self.sample_map.is_empty() && self.sample_size == 0 {
             let mut nsamp = 0;
             for (idx, samples) in self.sample_map.iter() {
                 if *idx as usize <= self.cur_chunk {