[Mplayer-cvslog] CVS: main/libmpdemux demux_rtp.cpp,1.21,1.22
Ross Finlayson CVS
syncmail at mplayerhq.hu
Tue Mar 2 09:53:02 CET 2004
CVS change done by Ross Finlayson CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv31422
Modified Files:
demux_rtp.cpp
Log Message:
We now allow for the possibility of the RTCP audio/video synchronization being
incorrect. (I encounted a stream for which this was the case.) Now, if
audio and video are out-of-sync by >60 seconds, we assume that the RTCP
sync is incorrect, and we don't discard any packets.
Index: demux_rtp.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rtp.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- demux_rtp.cpp 22 Feb 2004 06:20:08 -0000 1.21
+++ demux_rtp.cpp 2 Mar 2004 08:52:59 -0000 1.22
@@ -305,8 +305,14 @@
// audio and video streams get this far apart.)
// (We don't do this when streaming over TCP, because then the audio and
// video streams are interleaved.)
+ // (Also, if the stream is *excessively* far behind, then we allow
+ // the packet, because in this case it probably means that there was
+ // an error in the source's timestamp synchronization.)
const float ptsBehindThreshold = 1.0; // seconds
- if (ptsBehind < ptsBehindThreshold || rtspStreamOverTCP) { // packet's OK
+ const float ptsBehindLimit = 60.0; // seconds
+ if (ptsBehind < ptsBehindThreshold ||
+ ptsBehind > ptsBehindLimit ||
+ rtspStreamOverTCP) { // packet's OK
ds_add_packet(ds, dp);
break;
}
More information about the MPlayer-cvslog
mailing list