From: Kostya Shishkov Date: Mon, 22 Nov 2021 17:39:52 +0000 (+0100) Subject: use raw stream duration X-Git-Url: https://git.nihav.org/?p=nihav-player.git;a=commitdiff_plain;h=dbca8a6d522fde14d236bb09e09d199259288267 use raw stream duration --- 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, } }