[vlc-commits] demux: adaptative: fix regression with init segments

Francois Cartegnie git at videolan.org
Tue Nov 24 17:51:31 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Nov 24 17:49:23 2015 +0100| [8cc97cc2805e88093395782791427b0b39d05b36] | committer: Francois Cartegnie

demux: adaptative: fix regression with init segments

must not issue a discontinuity on first init segment

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

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

diff --git a/modules/demux/adaptative/SegmentTracker.cpp b/modules/demux/adaptative/SegmentTracker.cpp
index c8c27b2..71fb6df 100644
--- a/modules/demux/adaptative/SegmentTracker.cpp
+++ b/modules/demux/adaptative/SegmentTracker.cpp
@@ -155,12 +155,14 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed, HTTPConnectionM
         return NULL;
     }
 
-    /* stop initializing after 1st chunk */
-    initializing = false;
+    if(initializing)
+    {
+        b_gap = false;
+        /* stop initializing after 1st chunk */
+        initializing = false;
+    }
 
     SegmentChunk *chunk = segment->toChunk(count, rep, connManager);
-    if(chunk)
-        count++;
 
     /* We need to check segment/chunk format changes, as we can't rely on representation's (HLS)*/
     if(format != chunk->getStreamFormat())
@@ -175,6 +177,9 @@ SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed, HTTPConnectionM
         notify(SegmentTrackerEvent(chunk));
     }
 
+    if(chunk)
+        count++;
+
     return chunk;
 }
 



More information about the vlc-commits mailing list