aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2023-03-01 18:28:24 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2023-03-01 18:28:24 +0100
commite614e5e611a4ae6769a0da7cbccec5842b3dbd0f (patch)
tree8bfdaac9bb7c466f33a18e0265bed1651b71ec4b
parent951a626bb478d30a69e3b7ac7f76edfbb5db44aa (diff)
downloadnihav-e614e5e611a4ae6769a0da7cbccec5842b3dbd0f.tar.gz
realmedia: hopefully fix reported block size
-rw-r--r--nihav-realmedia/src/demuxers/realmedia.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/nihav-realmedia/src/demuxers/realmedia.rs b/nihav-realmedia/src/demuxers/realmedia.rs
index b2ea958..6335c6d 100644
--- a/nihav-realmedia/src/demuxers/realmedia.rs
+++ b/nihav-realmedia/src/demuxers/realmedia.rs
@@ -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]