[vlc-commits] demux: adaptive: enforce minimal deadline

Francois Cartegnie git at videolan.org
Fri Jan 20 21:35:04 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan 20 20:38:15 2017 +0100| [648a5e5d84d6a0569a65bdbc139ae7182233bb96] | committer: Francois Cartegnie

demux: adaptive: enforce minimal deadline

or breaks with slavedemuxers

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=648a5e5d84d6a0569a65bdbc139ae7182233bb96
---

 modules/demux/adaptive/Streams.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index b5cf95f..9134318 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -349,8 +349,9 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline
             return AbstractStream::buffering_suspended;
         }
 
-        nz_deadline = commandsqueue->getBufferingLevel() +
-                     (i_total_buffering - commandsqueue->getDemuxedAmount()) / (CLOCK_FREQ/4);
+        mtime_t nz_extdeadline = commandsqueue->getBufferingLevel() +
+                                (i_total_buffering - commandsqueue->getDemuxedAmount()) / (CLOCK_FREQ/4);
+        nz_deadline = std::max(nz_deadline, nz_extdeadline);
 
         /* need to read, demuxer still buffering, ... */
         vlc_mutex_unlock(&lock);



More information about the vlc-commits mailing list