diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2024-08-06 18:08:14 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2024-08-06 18:08:14 +0200 |
commit | 511f5e91f17edc3520a6c83a3b9150c2b3db6a63 (patch) | |
tree | 8f39e1d6ca9e404b021fe3193555b18078296c2a | |
parent | 12e9040136caa4a7ce81db5d717f12c0fea41ecd (diff) | |
download | nihav-511f5e91f17edc3520a6c83a3b9150c2b3db6a63.tar.gz |
mov: set block size when possible
This seems to allow decoding of e.g. MS IMA ADPCM variant
-rw-r--r-- | nihav-commonfmt/src/demuxers/mov.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |