[vlc-commits] demux: adaptive: always return a representation with predictive

Francois Cartegnie git at videolan.org
Fri Sep 30 19:41:58 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep 30 19:36:15 2016 +0200| [1dcb06c6b185781b2d26d27f488120215b81e18c] | committer: Francois Cartegnie

demux: adaptive: always return a representation with predictive

created regression on stream deactivation (prevRep became NULL)

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

 modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp b/modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
index 163b718..f5b9fbf 100644
--- a/modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
+++ b/modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
@@ -102,7 +102,11 @@ BaseRepresentation *PredictiveAdaptationLogic::getNextRepresentation(BaseAdaptat
         else
         {
             const unsigned i_available_bw = getAvailableBw(i_max_bitrate, prevRep);
-            if(f_buffering_level > 0.8)
+            if(!prevRep)
+            {
+                rep = selector.select(adaptSet, i_available_bw);
+            }
+            else if(f_buffering_level > 0.8)
             {
                 rep = selector.select(adaptSet, std::max((uint64_t) i_available_bw,
                                                          (uint64_t) prevRep->getBandwidth()));



More information about the vlc-commits mailing list