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

Pierre Ynard git at videolan.org
Mon Nov 9 20:46:07 CET 2020


vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun Nov  8 01:06:36 2020 +0100| [0ae8853780667e4d3602c95625f4b62c6f7a5419] | committer: Francois Cartegnie

adaptive: remove no-op logic in selector

Leftovers from 458adc37a516f5c55e1e09608d0eab7ff84c8242

Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>
(cherry picked from commit 1e0989819a4be70fd213900b4e2587d964c28096)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=0ae8853780667e4d3602c95625f4b62c6f7a5419
---

 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