Commit 99f578d3 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptative: merge segment info on double set

parent 202a0ae0
......@@ -326,16 +326,31 @@ mtime_t SegmentInformation::getPeriodStart() const
void SegmentInformation::setSegmentList(SegmentList *list)
{
segmentList = list;
if(segmentList)
{
segmentList->mergeWith(list);
delete list;
}
else
{
segmentList = list;
}
}
void SegmentInformation::setSegmentBase(SegmentBase *base)
{
if(segmentBase)
delete segmentBase;
segmentBase = base;
}
void SegmentInformation::setSegmentTemplate(MediaSegmentTemplate *templ)
{
if(mediaSegmentTemplate)
{
mediaSegmentTemplate->mergeWith(templ, 0);
delete templ;
}
mediaSegmentTemplate = templ;
}
......
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