diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-11-04 18:25:56 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-11-04 18:25:56 +0100 |
commit | 8e14efb001fac3fecb0cb56df8705d23fa2231a8 (patch) | |
tree | bdd21683de1db9d4c39d0d68cf8e180e7ea902cb /nihav-flash | |
parent | 3867d436b51515207e0035e2c6cb127de3935c57 (diff) | |
download | nihav-8e14efb001fac3fecb0cb56df8705d23fa2231a8.tar.gz |
switch demuxers to use NAStream::make_ts()
Diffstat (limited to 'nihav-flash')
-rw-r--r-- | nihav-flash/src/demuxers/flv.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nihav-flash/src/demuxers/flv.rs b/nihav-flash/src/demuxers/flv.rs index 82901ac..5f0dc0b 100644 --- a/nihav-flash/src/demuxers/flv.rs +++ b/nihav-flash/src/demuxers/flv.rs @@ -215,9 +215,8 @@ impl<'a> FLVDemuxer<'a> { data_size -= pkt_hdr_size; if data_size > 0 { let stream = strmgr.get_stream(self.astream).unwrap(); - let (tb_num, tb_den) = stream.get_timebase(); let pts = (u64::from(ext_time) << 24) | u64::from(time); - let ts = NATimeInfo::new(Some(pts), None, None, tb_num, tb_den); + let ts = stream.make_ts(Some(pts), None, None); self.apkts.push(self.src.read_packet(stream, ts, true, data_size)?); } }, @@ -352,10 +351,9 @@ impl<'a> FLVDemuxer<'a> { if data_size > 0 { let stream = strmgr.get_stream(self.vstream).unwrap(); - let (tb_num, tb_den) = stream.get_timebase(); let pts = (u64::from(ext_time) << 24) | u64::from(time); let dts = ((pts as i64) + i64::from(cts)).max(0) as u64; - let ts = NATimeInfo::new(Some(pts), Some(dts), None, tb_num, tb_den); + let ts = stream.make_ts(Some(pts), Some(dts), None); self.vpkts.push(self.src.read_packet(stream, ts, ftype == FrameType::I, data_size)?); } }, |