}
if packet.is_keyframe() {
let pts = packet.get_pts().unwrap_or(self.pts);
- let time = NATimeInfo::ts_to_time(pts, 1000, self.stream.tb_num, self.stream.tb_den);
+ let time = NATimeInfo::rescale_ts(pts, self.stream.tb_num, self.stream.tb_den, 1, 1000);
let in_range = if let Some(last) = self.seek.seek_info[0].entries.last() {
last.pts >= pts
} else {
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)
+ NATimeInfo::rescale_ts(ctx.stream.duration, ctx.stream.tb_num, ctx.stream.tb_den, 1, 1000)
},
_ => 0,
}