From 5948f8222706d63f603167bf1a17c20bdee0b321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 20 Apr 2010 07:38:52 +0000 Subject: 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 --- libavformat/rtpdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/rtpdec.c') diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index bd3566e..0d2df59 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -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; } } -- cgit v1.1