Commit 2da28c96 authored by François Cartegnie's avatar François 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,15 +192,20 @@ 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());
std::vector<Segment *>::const_iterator l;
for(l = (*k)->getSegmentList()->getSegments().begin();
l < (*k)->getSegmentList()->getSegments().end(); l++)
const SegmentList *segmentList = (*k)->getSegmentList();
if (segmentList)
{
msg_Dbg(p_stream, " Segment url=%s", (*l)->getSourceUrl().c_str());
std::vector<Segment *>::const_iterator l;
for(l = segmentList->getSegments().begin();
l < segmentList->getSegments().end(); l++)
{
msg_Dbg(p_stream, " Segment url=%s", (*l)->getSourceUrl().c_str());
}
}
}
}
......
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