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

dash: Parser: Standard (§5.4.4.1) specifies there can be at most one SegmentInfo node.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b3b66ecf
......@@ -94,16 +94,12 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
}
void BasicCMParser::setSegmentInfo (Node *root, Representation *rep)
{
std::vector<Node *> segmentInfo = DOMHelper::getChildElementByTagName(root, "SegmentInfo");
Node *segmentInfo = DOMHelper::getFirstChildElementByName( root, "SegmentInfo");
for(size_t i = 0; i < segmentInfo.size(); i++)
{
SegmentInfo *info = new SegmentInfo(segmentInfo.at(i)->getAttributes());
this->setInitSegment(segmentInfo.at(i), info);
this->setSegments(segmentInfo.at(i), info);
rep->setSegmentInfo(info);
return;
}
SegmentInfo *info = new SegmentInfo( segmentInfo->getAttributes() );
this->setInitSegment( segmentInfo, info );
this->setSegments(segmentInfo, info );
rep->setSegmentInfo(info);
}
void BasicCMParser::setInitSegment (Node *root, SegmentInfo *info)
{
......
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