From df0ba87f596b74f5f6a6bb561ae83880e6d08036 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 17 Mar 2025 18:20:36 +0100 Subject: [PATCH] avi: leave first PCM timestamp for time calculation --- nihav-commonfmt/src/demuxers/avi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index c0f54b4..c0ccc33 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -185,7 +185,7 @@ impl<'a> DemuxCore<'a> for AVIDemuxer<'a> { } let (tb_num, _) = stream.get_timebase(); let mut ts = stream.make_ts(Some(self.cur_frame[stream_no as usize]), None, None); - if stream.get_media_type() == StreamType::Audio && tb_num == 1 && stream.get_info().get_name() == "pcm" { + if stream.get_media_type() == StreamType::Audio && tb_num == 1 && stream.get_info().get_name() == "pcm" && ts.pts != Some(0) { ts.pts = None; } let mut pkt = self.src.read_packet(stream, ts, is_keyframe, size)?; -- 2.39.5