Commit 9240ed51 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: hls: parse segment discontinuity

parent 52a47237
......@@ -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;
......
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