[vlc-commits] demux: adaptive: prune live streams using resume time, not buffering pcr

Francois Cartegnie git at videolan.org
Wed May 16 20:03:14 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May 16 16:20:04 2018 +0200| [7c464570b2db8aa86691cd13799529d619b905d8] | committer: Francois Cartegnie

demux: adaptive: prune live streams using resume time, not buffering pcr

otherwise, segments are never available to reactivate a stream
from current playback time

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

 modules/demux/adaptive/PlaylistManager.cpp | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index ef69167199..d6571b3f21 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -395,19 +395,8 @@ mtime_t PlaylistManager::getCurrentPlaybackTime() const
 
 void PlaylistManager::pruneLiveStream()
 {
-    mtime_t minValidPos = 0;
-    std::vector<AbstractStream *>::const_iterator it;
-    for(it=streams.begin(); it!=streams.end(); it++)
-    {
-        const AbstractStream *st = *it;
-        if(st->isDisabled() || !st->isSelected())
-            continue;
-        const mtime_t t = st->getPlaybackTime();
-        if(minValidPos == 0 || t < minValidPos)
-            minValidPos = t;
-    }
-
-    if(minValidPos)
+    mtime_t minValidPos = getResumeTime();
+    if(minValidPos != VLC_TS_INVALID)
         playlist->pruneByPlaybackTime(minValidPos);
 }
 



More information about the vlc-commits mailing list