Simplify network timeout calculation.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23589 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
cehoyos 2007-06-20 10:39:57 +00:00
parent be09bd1c04
commit 634dfcbed7
1 changed files with 3 additions and 2 deletions

View File

@ -504,8 +504,9 @@ static demux_packet_t* getBuffer(demuxer_t* demuxer, demux_stream_t* ds,
// 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);