From: Kostya Shishkov Date: Tue, 6 Aug 2024 16:08:14 +0000 (+0200) Subject: mov: set block size when possible X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=511f5e91f17edc3520a6c83a3b9150c2b3db6a63;p=nihav.git mov: set block size when possible This seems to allow decoding of e.g. MS IMA ADPCM variant --- diff --git a/nihav-commonfmt/src/demuxers/mov.rs b/nihav-commonfmt/src/demuxers/mov.rs index a8d0dfd..aa84a20 100644 --- a/nihav-commonfmt/src/demuxers/mov.rs +++ b/nihav-commonfmt/src/demuxers/mov.rs @@ -723,7 +723,7 @@ fn read_stsd(track: &mut Track, br: &mut ByteReader, size: u64) -> DemuxerResult if &fcc == b"raw " && sample_size == 8 { soniton.signed = false; } - let block_align = 1; + let mut block_align = 1; match sver { 1 => { let samples_per_packet = br.read_u32be()?; @@ -733,6 +733,7 @@ fn read_stsd(track: &mut Track, br: &mut ByteReader, size: u64) -> DemuxerResult track.bsize = bytes_per_frame as usize; track.frame_samples = samples_per_packet as usize; track.tb_num = samples_per_packet; + block_align = bytes_per_frame as usize; }, 2 => { br.read_u32be()?; // some size