vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Thu Nov 24 
16:33:20 2011 +0100| [1f72229677fa80f9af594c984afc9e32ea917d6e] | committer: 
Rémi Denis-Courmont

dash: RateBasedAdaptationLogic: Removing useless loop.

Signed-off-by: Rémi Denis-Courmont <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f72229677fa80f9af594c984afc9e32ea917d6e
---

 .../adaptationlogic/RateBasedAdaptationLogic.cpp   |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git 
a/modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp 
b/modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
index 498c7df..03a3f8e 100644
--- a/modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
+++ b/modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
@@ -67,15 +67,12 @@ Chunk*  RateBasedAdaptationLogic::getNextChunk () 
throw(EOFException)
         return this->getNextChunk();
     }
 
-    for(size_t i = 0; i < segments.size(); i++)
+    if ( segments.size() > this->count )
     {
-        if(i == this->count)
-        {
-            this->count++;
-            Chunk *chunk = new Chunk();
-            chunk->setUrl(segments.at(i)->getSourceUrl());
-            return chunk;
-        }
+        Chunk *chunk = new Chunk;
+        chunk->setUrl( segments.at( this->count )->getSourceUrl() );
+        this->count++;
+        return chunk;
     }
     return NULL;
 }

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to