From: Kostya Shishkov Date: Fri, 30 Jun 2023 16:11:11 +0000 (+0200) Subject: mov: do not overwrite timebase with sample rate X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=de3f3f006ff7b0b6407111d4dca3ec124be398fb;p=nihav.git mov: do not overwrite timebase with sample rate E.g. in AAC SBR case we may get timebase 2048/44100 with the nominal sample rate being 22050 Hz. --- diff --git a/nihav-commonfmt/src/demuxers/mov.rs b/nihav-commonfmt/src/demuxers/mov.rs index f57b1c7..54a6c52 100644 --- a/nihav-commonfmt/src/demuxers/mov.rs +++ b/nihav-commonfmt/src/demuxers/mov.rs @@ -754,7 +754,9 @@ fn read_stsd(track: &mut Track, br: &mut ByteReader, size: u64) -> DemuxerResult track.bsize = (sample_size / 8) as usize; }, }; - track.tb_den = sample_rate; + if track.tb_den <= 1 { + track.tb_den = sample_rate; + } track.raw_audio = matches!(&fcc, b"NONE" | b"raw " | b"twos" | b"sowt" | b"in24" | b"in32" | b"fl32" | b"fl64" |