[vlc-commits] adaptive: remove no-op logic in selector

Pierre Ynard via vlc-devel git at videolan.org
Mon Nov 9 10:22:04 CET 2020


vlc | branch: master | Pierre Ynard via vlc-devel <vlc-devel at videolan.org> | Sun Nov  8 01:06:36 2020 +0100| [68c1e6fd99d82c01098a445be47f0b5750711497] | committer: Francois Cartegnie

adaptive: remove no-op logic in selector

Leftovers from 458adc37a516f5c55e1e09608d0eab7ff84c8242

Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>

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

 modules/demux/adaptive/logic/Representationselectors.cpp | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/modules/demux/adaptive/logic/Representationselectors.cpp b/modules/demux/adaptive/logic/Representationselectors.cpp
index 1d740f660a..1c2ac3473c 100644
--- a/modules/demux/adaptive/logic/Representationselectors.cpp
+++ b/modules/demux/adaptive/logic/Representationselectors.cpp
@@ -91,17 +91,8 @@ BaseRepresentation * RepresentationSelector::select(BaseAdaptationSet *adaptSet,
     if (adaptSet == NULL)
         return NULL;
 
-    BaseRepresentation *best = NULL;
     std::vector<BaseRepresentation *> reps = adaptSet->getRepresentations();
-    BaseRepresentation *candidate = select(reps, (best)?best->getBandwidth():0, bitrate);
-    if (candidate)
-    {
-        if (candidate->getBandwidth() > bitrate) /* none matched, returned lowest */
-            return candidate;
-        best = candidate;
-    }
-
-    return best;
+    return select(reps, 0, bitrate);
 }
 
 BaseRepresentation * RepresentationSelector::select(std::vector<BaseRepresentation *>& reps,



More information about the vlc-commits mailing list