From dbca8a6d522fde14d236bb09e09d199259288267 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 22 Nov 2021 18:39:52 +0100 Subject: [PATCH] use raw stream duration --- sndplay/src/demux.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sndplay/src/demux.rs b/sndplay/src/demux.rs index f2e8870..ac483da 100644 --- a/sndplay/src/demux.rs +++ b/sndplay/src/demux.rs @@ -159,6 +159,9 @@ impl<'a> DemuxerObject<'a> { match *self { DemuxerObject::Normal(ref dmx) => dmx.get_duration(), DemuxerObject::Raw(ref dmx, _, _) => dmx.get_duration(), + DemuxerObject::RawStream(ref ctx) => { + NATimeInfo::ts_to_time(ctx.stream.duration, 1000, ctx.stream.tb_num, ctx.stream.tb_den) + }, _ => 0, } } -- 2.30.2