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

Francois Cartegnie git at videolan.org
Mon Dec 14 10:41:36 UTC 2020


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct  7 22:21:03 2020 +0200| [237b9d237a1f4abb00c51337e4609b83be82fbd2] | committer: Francois Cartegnie

demux: adaptive: fix read cache truncation

regression from 467c01b34a7034277fa0cd5e3eac05242a9b5888

(cherry picked from commit 752a6c481dac14faa13875bd395fb520496a11c6)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=237b9d237a1f4abb00c51337e4609b83be82fbd2
---

 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 feecd1de2f..6cb4a88972 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