[vlc-commits] demux: adaptative: disable alternate streams after demuxing stage

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


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Nov  9 20:05:34 2015 +0100| [064c2f72c021a25def3e38baf486a7c56187cfb6] | committer: Francois Cartegnie

demux: adaptative: disable alternate streams after demuxing stage

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

 modules/demux/adaptative/Streams.cpp |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index fd41eb7..25d3b46 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -139,12 +139,6 @@ SegmentChunk * AbstractStream::getChunk()
 {
     if (currentChunk == NULL && !eof)
     {
-        if(esCount() && !isSelected())
-        {
-            disabled = true;
-            segmentTracker->reset();
-            return NULL;
-        }
         currentChunk = segmentTracker->getNextChunk(!fakeesout->restarting(), connManager);
         if (currentChunk == NULL)
             eof = true;
@@ -286,6 +280,13 @@ AbstractStream::status AbstractStream::demux(mtime_t nz_deadline, bool send)
     if(send)
         pcr = fakeesout->commandsqueue.Process( p_realdemux->out, VLC_TS_0 + nz_deadline );
 
+    /* Disable streams that are not selected (alternate streams) */
+    if(esCount() && !isSelected() && !fakeesout->restarting())
+    {
+        disabled = true;
+        segmentTracker->reset();
+    }
+
     return AbstractStream::status_demuxed;
 }
 



More information about the vlc-commits mailing list