vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Wed Feb 1 11:08:23 2012 +0100| [f9d613c5131b21cedb7af906a9db39e74a23093e] | committer: Hugo Beauzée-Luyssen
dash: removing useless loop > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f9d613c5131b21cedb7af906a9db39e74a23093e --- .../adaptationlogic/AlwaysBestAdaptationLogic.cpp | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp b/modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp index 0ec58de..e37c00a 100644 --- a/modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp +++ b/modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp @@ -51,15 +51,12 @@ Chunk* AlwaysBestAdaptationLogic::getNextChunk() throw(EOFException) if(this->count == this->schedule.size()) throw EOFException(); - for(size_t i = 0; i < this->schedule.size(); i++) + if ( this->count < this->schedule.size() ) { - if(this->count == i) - { - Chunk *chunk = new Chunk(); - chunk->setUrl(this->schedule.at(i)->getSourceUrl()); - this->count++; - return chunk; - } + Chunk *chunk = new Chunk(); + chunk->setUrl(this->schedule.at( this->count )->getSourceUrl()); + this->count++; + return chunk; } return NULL; } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
