]> git.nihav.org Git - nihav.git/commitdiff
mov: yet another fix for raw audio demuxing
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 22 Feb 2026 18:48:10 +0000 (19:48 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 22 Feb 2026 18:48:10 +0000 (19:48 +0100)
nihav-commonfmt/src/demuxers/mov.rs

index fce6336b0f58d9b69659b3ae73abd17aed0e85ee..a614d232c43066da679bec40347ba013863d9614 100644 (file)
@@ -1483,7 +1483,7 @@ impl Track {
                 self.samples_left -= 1;
             } else {
                 const BLOCK_SAMPLES: usize = 1024 * 6; // should be multiple of 64 and 6 to fit both IMA ADPCM and MACE 6:1 blocks
-                if size > 1 {
+                if size > self.calculate_chunk_size(1) {
                     let max_size = self.calculate_chunk_size(BLOCK_SAMPLES);
                     let cur_size = self.calculate_chunk_size(self.samples_left);
                     let add_off = (size - cur_size) as u64;