[vlc-devel] [PATCH 2/4] adaptive: remove no-op logic in selector

Pierre Ynard linkfanel at yahoo.fr
Sun Nov 8 01:06:36 CET 2020


Leftovers from 458adc37a516f5c55e1e09608d0eab7ff84c8242


diff --git a/modules/demux/adaptive/logic/Representationselectors.cpp b/modules/demux/adaptive/logic/Representationselectors.cpp
index 1d740f6..1c2ac34 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,
-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."


More information about the vlc-devel mailing list