[vlc-commits] demux: smooth: trigger full playlist update when reaching end of timeline
Francois Cartegnie
git at videolan.org
Wed Feb 1 16:11:27 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 1 10:43:30 2017 +0100| [3b2ae23d898ef42492d87c7301102d611b4928ea] | committer: Francois Cartegnie
demux: smooth: trigger full playlist update when reaching end of timeline
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3b2ae23d898ef42492d87c7301102d611b4928ea
---
modules/demux/smooth/SmoothManager.cpp | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/modules/demux/smooth/SmoothManager.cpp b/modules/demux/smooth/SmoothManager.cpp
index 1d9879a..5644f58 100644
--- a/modules/demux/smooth/SmoothManager.cpp
+++ b/modules/demux/smooth/SmoothManager.cpp
@@ -93,7 +93,25 @@ Manifest * SmoothManager::fetchManifest()
bool SmoothManager::updatePlaylist()
{
- return updatePlaylist(false);
+ bool b_playlist_empty = false;
+ /* Trigger full playlist update in case we cannot get next
+ segment from atom */
+ std::vector<AbstractStream *>::const_iterator it;
+ for(it=streams.begin(); it!=streams.end(); ++it)
+ {
+ const AbstractStream *st = *it;
+ const mtime_t m = st->getMinAheadTime();
+ if(st->isDisabled() || !st->isSelected())
+ {
+ continue;
+ }
+ else if(m < 1)
+ {
+ b_playlist_empty = true;
+ break;
+ }
+ }
+ return updatePlaylist(b_playlist_empty);
}
void SmoothManager::scheduleNextUpdate()
More information about the vlc-commits
mailing list