vlc | branch: master | Zhao Zhili <[email protected]> | Wed Jan 17 11:33:38 2018 +0800| [d29d14402e887d4a8a5a8406d23142596999669f] | committer: Francois Cartegnie
demux: adaptive: fix deadline maths All variables are in microseconds. For buffering level is 0, i_total_buffering is 60 * CLOCK_FREQ microseconds, demuxed amount is 0, nz_extdeadline would be 240 microseconds. It's not the code supposed to do. Signed-off-by: Francois Cartegnie <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d29d14402e887d4a8a5a8406d23142596999669f --- modules/demux/adaptive/Streams.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp index ecb3efc68b..06756fdd01 100644 --- a/modules/demux/adaptive/Streams.cpp +++ b/modules/demux/adaptive/Streams.cpp @@ -366,7 +366,7 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline } mtime_t nz_extdeadline = commandsqueue->getBufferingLevel() + - (i_total_buffering - commandsqueue->getDemuxedAmount()) / (CLOCK_FREQ/4); + (i_total_buffering - commandsqueue->getDemuxedAmount()) / 4; nz_deadline = std::max(nz_deadline, nz_extdeadline); /* need to read, demuxer still buffering, ... */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
