Mercurial > mplayer.hg
changeset 23569:ba3868fbe12c
Simplify network timeout calculation.
author | cehoyos |
---|---|
date | Wed, 20 Jun 2007 10:39:57 +0000 |
parents | 519e42b716aa |
children | d1384f52f892 |
files | libmpdemux/demux_rtp.cpp |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_rtp.cpp Wed Jun 20 02:26:20 2007 +0000 +++ b/libmpdemux/demux_rtp.cpp Wed Jun 20 10:39:57 2007 +0000 @@ -504,8 +504,9 @@ // 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);