[vlc-commits] demux: hls: fix byte range parsing
Francois Cartegnie
git at videolan.org
Mon Jul 11 16:21:53 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jul 11 16:20:50 2016 +0200| [da80296196f996cb5b1648b9dcc4bc92b4c638fe] | committer: Francois Cartegnie
demux: hls: fix byte range parsing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=da80296196f996cb5b1648b9dcc4bc92b4c638fe
---
modules/demux/hls/playlist/Parser.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index 9cf7e97..38f8338 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -284,10 +284,10 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s
if(ctx_byterange)
{
std::pair<std::size_t,std::size_t> range = ctx_byterange->getValue().getByteRange();
- if(range.first == 0)
+ if(range.first == 0) /* first == size, second = offset */
range.first = prevbyterangeoffset;
prevbyterangeoffset = range.first + range.second;
- segment->setByteRange(range.first, prevbyterangeoffset);
+ segment->setByteRange(range.first, prevbyterangeoffset - 1);
ctx_byterange = NULL;
}
More information about the vlc-commits
mailing list