changeset 10937:384f6a88a31d

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.
author rsf
date Wed, 24 Sep 2003 08:41:57 +0000
parents 51bc09f2977c
children b1c983477841
files libmpdemux/demux_rtp.cpp
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rtp.cpp	Wed Sep 24 07:38:57 2003 +0000
+++ b/libmpdemux/demux_rtp.cpp	Wed Sep 24 08:41:57 2003 +0000
@@ -501,8 +501,11 @@
   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 {