summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.c
diff options
context:
space:
mode:
authorJohn Brooks <john.brooks@bluecherry.net>2011-11-09 16:28:35 -0700
committerMartin Storsjö <martin@martin.st>2011-11-18 10:47:28 +0200
commit525c5b08fb835cad000810d6299964f300a17daa (patch)
tree10163d9f5c8536e1dee65fbbfee520a6b866c26e /libavformat/rtpdec.c
parent12348ca25e0bf44bf4530745753e938fc54e7ae3 (diff)
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ö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r--libavformat/rtpdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 94fa0f102b..88cf15bdea 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;