use raw stream duration
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 22 Nov 2021 17:43:03 +0000 (18:43 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 22 Nov 2021 17:43:03 +0000 (18:43 +0100)
src/demux.rs

index 28f564d88134f1e3986854dba1efd56d236b5f28..859faf5acad11c99716f1826c2e845103c91bc35 100644 (file)
@@ -151,6 +151,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,
         }
     }