comparison rtpdec.c @ 5967:c5a3e1951fc6 libavformat

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.
author mstorsjo
date Tue, 20 Apr 2010 07:38:52 +0000
parents 9a86b49201bb
children 5708c6d4223d
comparison
equal deleted inserted replaced
5966:9a86b49201bb 5967:c5a3e1951fc6
435 435
436 /* compute pts from timestamp with received ntp_time */ 436 /* compute pts from timestamp with received ntp_time */
437 delta_timestamp = timestamp - s->last_rtcp_timestamp; 437 delta_timestamp = timestamp - s->last_rtcp_timestamp;
438 /* convert to the PTS timebase */ 438 /* convert to the PTS timebase */
439 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); 439 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);
440 pkt->pts = addend + delta_timestamp; 440 pkt->pts = s->range_start_offset + addend + delta_timestamp;
441 } 441 }
442 } 442 }
443 443
444 /** 444 /**
445 * Parse an RTP or RTCP packet directly sent as a buffer. 445 * Parse an RTP or RTCP packet directly sent as a buffer.