Reset RTCP timestamps after seeking, add range start offset to the packets timestamps

If these aren't reset, the timestamps make a huge jump when the next RTCP
is received.

Originally committed as revision 22918 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Martin Storsjö
2010-04-20 07:38:52 +00:00
parent 2cab6b48ad
commit 5948f82227
3 changed files with 19 additions and 1 deletions

View File

@@ -437,7 +437,7 @@ static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestam
delta_timestamp = timestamp - s->last_rtcp_timestamp;
/* convert to the PTS timebase */
addend = av_rescale(s->last_rtcp_ntp_time - s->first_rtcp_ntp_time, s->st->time_base.den, (uint64_t)s->st->time_base.num << 32);
pkt->pts = addend + delta_timestamp;
pkt->pts = s->range_start_offset + addend + delta_timestamp;
}
}