mirror of https://github.com/mpv-player/mpv
Simplify network timeout calculation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23589 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
be09bd1c04
commit
634dfcbed7
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue