[vlc-commits] dash: Parser: Standard (=?UTF-8?Q?=C2=A75?=.4.4.1) specifies there can be at most one SegmentInfo node.
Hugo Beauzée-Luyssen
git at videolan.org
Sat Nov 26 13:03:30 CET 2011
vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Nov 24 17:37:43 2011 +0100| [740c733e4cb505d709f0ed1d7ac9275db24024c2] | committer: Jean-Baptiste Kempf
dash: Parser: Standard (§5.4.4.1) specifies there can be at most one SegmentInfo node.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=740c733e4cb505d709f0ed1d7ac9275db24024c2
---
modules/stream_filter/dash/mpd/BasicCMParser.cpp | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/modules/stream_filter/dash/mpd/BasicCMParser.cpp b/modules/stream_filter/dash/mpd/BasicCMParser.cpp
index b4543b9..c1aea0d 100644
--- a/modules/stream_filter/dash/mpd/BasicCMParser.cpp
+++ b/modules/stream_filter/dash/mpd/BasicCMParser.cpp
@@ -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)
{
More information about the vlc-commits
mailing list