[vlc-commits] demux: adaptive: fix read cache truncation

Francois Cartegnie git at videolan.org
Wed Oct 7 22:23:43 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct  7 22:21:03 2020 +0200| [752a6c481dac14faa13875bd395fb520496a11c6] | committer: Francois Cartegnie

demux: adaptive: fix read cache truncation

regression from 467c01b34a7034277fa0cd5e3eac05242a9b5888

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

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

diff --git a/modules/demux/adaptive/plumbing/SourceStream.cpp b/modules/demux/adaptive/plumbing/SourceStream.cpp
index a9fe0de65e..c6183e0ed3 100644
--- a/modules/demux/adaptive/plumbing/SourceStream.cpp
+++ b/modules/demux/adaptive/plumbing/SourceStream.cpp
@@ -312,10 +312,9 @@ std::string BufferedChunksSourceStream::getContentType()
     return source->getContentType();
 }
 
-void BufferedChunksSourceStream::fillByteStream(size_t sz)
+void BufferedChunksSourceStream::fillByteStream(size_t level)
 {
-    sz = std::min(sz, (size_t)MAX_BACKEND);
-    while(!b_eof && sz > block_BytestreamRemaining(&bs))
+    while(!b_eof && level > block_BytestreamRemaining(&bs))
     {
         block_t *p_block = source->readNextBlock();
         b_eof = !p_block;



More information about the vlc-commits mailing list