From d7f68d1212628d6a5b6f0c0eafda018c5fe4d83b Mon Sep 17 00:00:00 2001 From: rsf Date: Wed, 24 Sep 2003 08:41:57 +0000 Subject: [PATCH] Changed the criteria for when to drop RTP packets whose timestamp is too far behind that of the other (audio or video) stream. Now, this is done only if both streams have been synchronized using RTCP. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10938 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_rtp.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp index 35a3751757..f40dfed73c 100644 --- a/libmpdemux/demux_rtp.cpp +++ b/libmpdemux/demux_rtp.cpp @@ -501,8 +501,11 @@ static demux_packet_t* getBuffer(demuxer_t* demuxer, demux_stream_t* ds, scheduler.doEventLoop(&bufferQueue->blockingFlag); // Set the "ptsBehind" result parameter: - if (bufferQueue->prevPacketPTS != 0.0 && *(bufferQueue->otherQueue) != NULL - && (*(bufferQueue->otherQueue))->prevPacketPTS != 0.0) { + if (bufferQueue->prevPacketPTS != 0.0 + && bufferQueue->prevPacketWasSynchronized + && *(bufferQueue->otherQueue) != NULL + && (*(bufferQueue->otherQueue))->prevPacketPTS != 0.0 + && (*(bufferQueue->otherQueue))->prevPacketWasSynchronized) { ptsBehind = (*(bufferQueue->otherQueue))->prevPacketPTS - bufferQueue->prevPacketPTS; } else {