Commit 8c55fe50 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

dash: Avoid crashing when there's no SegmentInfo node.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3082f245
......@@ -96,11 +96,15 @@ void BasicCMParser::setSegmentInfo (Node *root, Representation *rep)
{
Node *segmentInfo = DOMHelper::getFirstChildElementByName( root, "SegmentInfo");
SegmentInfo *info = new SegmentInfo( segmentInfo->getAttributes() );
this->setInitSegment( segmentInfo, info );
this->setSegments(segmentInfo, info );
rep->setSegmentInfo(info);
if ( segmentInfo )
{
SegmentInfo *info = new SegmentInfo( segmentInfo->getAttributes() );
this->setInitSegment( segmentInfo, info );
this->setSegments(segmentInfo, info );
rep->setSegmentInfo(info);
}
}
void BasicCMParser::setInitSegment (Node *root, SegmentInfo *info)
{
std::vector<Node *> initSeg = DOMHelper::getChildElementByTagName(root, "InitialisationSegmentURL");
......
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