From: Kostya Shishkov Date: Fri, 23 Oct 2020 10:11:58 +0000 (+0200) Subject: mov: adjust signedness for certain kinds of audio X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=e5d3fef58177a87f67cfbe31a65df7a34f13b83b;p=nihav.git mov: adjust signedness for certain kinds of audio --- diff --git a/nihav-commonfmt/src/demuxers/mov.rs b/nihav-commonfmt/src/demuxers/mov.rs index b271b95..5a0e4f9 100644 --- a/nihav-commonfmt/src/demuxers/mov.rs +++ b/nihav-commonfmt/src/demuxers/mov.rs @@ -592,8 +592,10 @@ fn read_stsd(track: &mut Track, br: &mut ByteReader, size: u64) -> DemuxerResult } else { "unknown" }; -//todo adjust format for various PCM kinds - let soniton = NASoniton::new(sample_size as u8, SONITON_FLAG_SIGNED | SONITON_FLAG_BE); + let mut soniton = NASoniton::new(sample_size as u8, SONITON_FLAG_SIGNED | SONITON_FLAG_BE); + if &fcc == b"raw " && sample_size == 8 { + soniton.signed = false; + } let block_align = 1; if sver == 1 { let samples_per_packet = br.read_u32be()?;