]> git.nihav.org Git - nihav.git/commitdiff
realmedia: hopefully fix reported block size
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 1 Mar 2023 17:28:24 +0000 (18:28 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 1 Mar 2023 17:28:24 +0000 (18:28 +0100)
nihav-realmedia/src/demuxers/realmedia.rs

index b2ea95896e1c4372c5f2d96a4e6a6791e0fa7a63..6335c6d9b426730ef7c84d6e20621ad3b5c0faad 100644 (file)
@@ -510,7 +510,11 @@ println!("unknown MLTI substream {:08X} / {:08X}", tag, tag2);
         };
         let cname = find_codec_name(RM_AUDIO_CODEC_REGISTER, ainfo.fcc);
         let blk_size = if ainfo.fcc != mktag!(b"sipr") {
-                ainfo.granularity as usize
+                if let Some(ref iinfo) = ainfo.ileave_info {
+                    iinfo.block_size as usize
+                } else {
+                    ainfo.granularity as usize
+                }
             } else {
                 validate!(ainfo.flavor <= 3);
                 RM_SIPRO_BLOCK_SIZES[ainfo.flavor as usize]