[vlc-commits] demux: hls: parse segment discontinuity
Francois Cartegnie
git at videolan.org
Tue Oct 6 13:16:36 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Oct 5 23:44:08 2015 +0200| [9240ed51533178430ff00bfe069f0b445a3ca059] | committer: Francois Cartegnie
demux: hls: parse segment discontinuity
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9240ed51533178430ff00bfe069f0b445a3ca059
---
modules/demux/hls/playlist/Parser.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index 9f44cc9..897ae17 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -179,6 +179,7 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s
stime_t totalduration = 0;
stime_t nzStartTime = 0;
uint64_t sequenceNumber = 0;
+ bool discontinuity = false;
std::size_t prevbyterangeoffset = 0;
const SingleValueTag *ctx_byterange = NULL;
SegmentEncryption encryption;
@@ -243,6 +244,12 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s
ctx_byterange = NULL;
}
+ if(discontinuity)
+ {
+ segment->discontinuity = true;
+ discontinuity = false;
+ }
+
if(encryption.method != SegmentEncryption::NONE)
segment->setEncryption(encryption);
}
@@ -300,6 +307,10 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s
}
break;
+ case Tag::EXTXDISCONTINUITY:
+ discontinuity = true;
+ break;
+
case Tag::EXTXENDLIST:
rep->b_live = false;
break;
More information about the vlc-commits
mailing list