Commit 2da28c96 authored by Francois Cartegnie's avatar Francois Cartegnie

stream_filter: dash: fix iteration on different lists

List was not returned by reference
parent 82a8e3f2
......@@ -58,7 +58,7 @@ void AdaptationSet::setSubsegmentAlignmentFlag(bool alignment)
this->subsegmentAlignmentFlag = alignment;
}
std::vector<Representation*> AdaptationSet::getRepresentations ()
std::vector<Representation*>& AdaptationSet::getRepresentations ()
{
return this->representations;
}
......
......@@ -46,7 +46,7 @@ namespace dash
bool getSubsegmentAlignmentFlag() const;
void setSubsegmentAlignmentFlag( bool alignment );
std::vector<Representation *> getRepresentations ();
std::vector<Representation *>& getRepresentations ();
const Representation* getRepresentationById ( const std::string &id ) const;
const SegmentInfoDefault* getSegmentInfoDefault() const;
void setSegmentInfoDefault( const SegmentInfoDefault* seg );
......
......@@ -192,13 +192,17 @@ void IsoffMainParser::print ()
{
msg_Dbg(p_stream, " AdaptationSet");
std::vector<Representation *>::const_iterator k;
for(k = (*j)->getRepresentations().begin(); k != (*j)->getRepresentations().begin(); k++)
for(k = (*j)->getRepresentations().begin(); k != (*j)->getRepresentations().end(); k++)
{
msg_Dbg(p_stream, " Representation");
msg_Dbg(p_stream, " InitSeg url=%s", (*k)->getSegmentBase()->getInitSegment()->getSourceUrl().c_str());
const SegmentList *segmentList = (*k)->getSegmentList();
if (segmentList)
{
std::vector<Segment *>::const_iterator l;
for(l = (*k)->getSegmentList()->getSegments().begin();
l < (*k)->getSegmentList()->getSegments().end(); l++)
for(l = segmentList->getSegments().begin();
l < segmentList->getSegments().end(); l++)
{
msg_Dbg(p_stream, " Segment url=%s", (*l)->getSourceUrl().c_str());
}
......@@ -206,4 +210,5 @@ void IsoffMainParser::print ()
}
}
}
}
}
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