[MPlayer-cvslog] r23589 - trunk/libmpdemux/demux_rtp.cpp

cehoyos subversion at mplayerhq.hu
Wed Jun 20 12:39:58 CEST 2007


Author: cehoyos
Date: Wed Jun 20 12:39:57 2007
New Revision: 23589

Log:
Simplify network timeout calculation.

Modified:
   trunk/libmpdemux/demux_rtp.cpp

Modified: trunk/libmpdemux/demux_rtp.cpp
==============================================================================
--- trunk/libmpdemux/demux_rtp.cpp	(original)
+++ trunk/libmpdemux/demux_rtp.cpp	Wed Jun 20 12:39:57 2007
@@ -504,8 +504,9 @@ static demux_packet_t* getBuffer(demuxer
   // Block ourselves until data becomes available:
   TaskScheduler& scheduler
     = bufferQueue->readSource()->envir().taskScheduler();
-  int delay = bufferQueue->prevPacketPTS * 1.05 >
-      rtpState->mediaSession->playEndTime() ? 1000000 : 10000000;
+  int delay = 10000000;
+  if (bufferQueue->prevPacketPTS * 1.05 > rtpState->mediaSession->playEndTime())
+    delay /= 10;
   task = scheduler.scheduleDelayedTask(delay, onSourceClosure, bufferQueue);
   scheduler.doEventLoop(&bufferQueue->blockingFlag);
   scheduler.unscheduleDelayedTask(task);



More information about the MPlayer-cvslog mailing list