From: John Brooks Date: Wed, 9 Nov 2011 23:28:35 +0000 (-0700) Subject: rtpdec: only use RTCP for PTS when synchronizing multiple streams X-Git-Tag: v0.8b1~555 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=525c5b08fb835cad000810d6299964f300a17daa;p=platform%2Fupstream%2Flibav.git rtpdec: only use RTCP for PTS when synchronizing multiple streams RTCP timestamps are only necessary to synchronize time between multiple streams. For a single stream, the RTP packet timestamp provides more reliable timing. As a result, single-stream RTP sessions should now have accurate and monotonic PTS. Signed-off-by: Martin Storsjö --- diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 94fa0f1..88cf15b 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -424,7 +424,7 @@ static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestam if (timestamp == RTP_NOTS_VALUE) return; - if (s->last_rtcp_ntp_time != AV_NOPTS_VALUE) { + if (s->last_rtcp_ntp_time != AV_NOPTS_VALUE && s->ic->nb_streams > 1) { int64_t addend; int delta_timestamp;