[vlc-commits] demux: adaptive: fix buffered stream block tuncation after peek
Francois Cartegnie
git at videolan.org
Mon Jan 13 16:47:03 CET 2020
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Nov 19 13:16:43 2019 +0900| [9346e0ffef340817053eb8261089c5e50b9c5c65] | committer: Francois Cartegnie
demux: adaptive: fix buffered stream block tuncation after peek
refs #23086
(cherry picked from commit 4e32c392ee3bca6b69b01f863096b82ed005c368)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=9346e0ffef340817053eb8261089c5e50b9c5c65
---
modules/demux/adaptive/plumbing/SourceStream.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/demux/adaptive/plumbing/SourceStream.cpp b/modules/demux/adaptive/plumbing/SourceStream.cpp
index 99edcd0e1c..dc8fd4f1d0 100644
--- a/modules/demux/adaptive/plumbing/SourceStream.cpp
+++ b/modules/demux/adaptive/plumbing/SourceStream.cpp
@@ -231,13 +231,13 @@ ssize_t BufferedChunksSourceStream::Read(uint8_t *buf, size_t size)
if(i_remain < i_toread)
{
block_t *p_add = source->readNextBlock();
- if(!p_add)
+ if(p_add)
{
- b_eof = true;
- break;
+ i_remain += p_add->i_buffer;
+ block_BytestreamPush(&bs, p_add);
+
}
- i_remain += p_add->i_buffer;
- block_BytestreamPush(&bs, p_add);
+ else b_eof = true;
}
size_t i_read;
More information about the vlc-commits
mailing list