[vlc-commits] demux: adaptative: force switch on deactivated streams

Francois Cartegnie git at videolan.org
Tue Nov 10 11:17:43 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Nov 10 11:04:04 2015 +0100| [070398a5c188f5a8ec07c26ac04b5279fea849ab] | committer: Francois Cartegnie

demux: adaptative: force switch on deactivated streams

Because representation is now unset on stream deactivation,
we need to force selecting one.

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

 modules/demux/adaptative/SegmentTracker.cpp |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptative/SegmentTracker.cpp b/modules/demux/adaptative/SegmentTracker.cpp
index 85cd902..3b1faf3 100644
--- a/modules/demux/adaptative/SegmentTracker.cpp
+++ b/modules/demux/adaptative/SegmentTracker.cpp
@@ -81,8 +81,13 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed, HTTPConnectionM
         return NULL;
 
     /* Ensure we don't keep chaining init/index without data */
-    if( initializing && prevRepresentation )
-        switch_allowed = false;
+    if( initializing )
+    {
+        if( prevRepresentation )
+            switch_allowed = false;
+        else
+            switch_allowed = true;
+    }
 
     if( !switch_allowed ||
        (prevRepresentation && prevRepresentation->getSwitchPolicy() == SegmentInformation::SWITCH_UNAVAILABLE) )



More information about the vlc-commits mailing list