{
pkt.data.frame.flags |= VPX_FRAME_IS_INVISIBLE;
- // TODO: ideally this timestamp should be as close as
- // possible to the prior PTS so that if a decoder uses
- // pts to schedule when to do this, we start right after
- // last frame was decoded. Maybe should be set to
- // last time stamp. Invisible frames have no duration..
- pkt.data.frame.pts --;
+ // This timestamp should be as close as possible to the
+ // prior PTS so that if a decoder uses pts to schedule when
+ // to do this, we start right after last frame was decoded.
+ // Invisible frames have no duration.
+ pkt.data.frame.pts = ((cpi->last_time_stamp_seen
+ * ctx->cfg.g_timebase.den + round)
+ / ctx->cfg.g_timebase.num / 10000000) + 1;
pkt.data.frame.duration = 0;
}