Commit 9240ed51 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: hls: parse segment discontinuity

parent 52a47237
...@@ -179,6 +179,7 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s ...@@ -179,6 +179,7 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s
stime_t totalduration = 0; stime_t totalduration = 0;
stime_t nzStartTime = 0; stime_t nzStartTime = 0;
uint64_t sequenceNumber = 0; uint64_t sequenceNumber = 0;
bool discontinuity = false;
std::size_t prevbyterangeoffset = 0; std::size_t prevbyterangeoffset = 0;
const SingleValueTag *ctx_byterange = NULL; const SingleValueTag *ctx_byterange = NULL;
SegmentEncryption encryption; SegmentEncryption encryption;
...@@ -243,6 +244,12 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s ...@@ -243,6 +244,12 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s
ctx_byterange = NULL; ctx_byterange = NULL;
} }
if(discontinuity)
{
segment->discontinuity = true;
discontinuity = false;
}
if(encryption.method != SegmentEncryption::NONE) if(encryption.method != SegmentEncryption::NONE)
segment->setEncryption(encryption); segment->setEncryption(encryption);
} }
...@@ -300,6 +307,10 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s ...@@ -300,6 +307,10 @@ void M3U8Parser::parseSegments(vlc_object_t *p_obj, Representation *rep, const s
} }
break; break;
case Tag::EXTXDISCONTINUITY:
discontinuity = true;
break;
case Tag::EXTXENDLIST: case Tag::EXTXENDLIST:
rep->b_live = false; rep->b_live = false;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment