From: Kostya Shishkov Date: Sat, 20 Oct 2018 10:57:47 +0000 (+0200) Subject: rmdec: skip RM-specific first byte of AAC extradata X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=843c8c87a1d0df3a3522f34c9c256be72c7c1f18;p=nihav.git rmdec: skip RM-specific first byte of AAC extradata --- diff --git a/src/demuxers/realmedia.rs b/src/demuxers/realmedia.rs index 020e8c0..571f97b 100644 --- a/src/demuxers/realmedia.rs +++ b/src/demuxers/realmedia.rs @@ -653,7 +653,7 @@ fn parse_aformat5(src: &mut ByteReader) -> DemuxerResult { if has_ileave_pattern != 0 { unimplemented!("ra5 interleave pattern"); } - let edata_size = src.read_u32be()?; + let mut edata_size = src.read_u32be()?; let end = src.tell(); validate!(end - start <= (header_size as u64) + 10); @@ -666,6 +666,11 @@ unimplemented!("ra5 interleave pattern"); } else { None }; + if (fcc == mktag!(b"raac")) || (fcc == mktag!(b"racp")) { + validate!(edata_size > 1); + edata_size -= 1; + src.read_skip(1)?; + } Ok(RealAudioInfo { fcc: fcc, flavor: flavor,