[vlc-commits] demux: adaptive: don't try to demux if everything is deselected
Francois Cartegnie
git at videolan.org
Mon May 20 16:58:05 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May 16 18:23:45 2019 +0200| [46e5994dacaf1b44dadd2fe8d04e24e77f0af3b2] | committer: Francois Cartegnie
demux: adaptive: don't try to demux if everything is deselected
can happen without decoders
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46e5994dacaf1b44dadd2fe8d04e24e77f0af3b2
---
modules/demux/adaptive/PlaylistManager.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index b80df667dc..5b94eeb88e 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -428,13 +428,17 @@ int PlaylistManager::doDemux(vlc_tick_t increment)
if(demux.i_nzpcr == VLC_TICK_INVALID)
{
bool b_dead = true;
+ bool b_all_disabled = true;
std::vector<AbstractStream *>::const_iterator it;
for(it=streams.begin(); it!=streams.end(); ++it)
+ {
b_dead &= !(*it)->isValid();
+ b_all_disabled &= (*it)->isDisabled();
+ }
if(!b_dead)
vlc_cond_timedwait(&demux.cond, &demux.lock, vlc_tick_now() + VLC_TICK_FROM_MS(50));
vlc_mutex_unlock(&demux.lock);
- return (b_dead) ? AbstractStream::status_eof : AbstractStream::status_buffering;
+ return (b_dead || b_all_disabled) ? AbstractStream::status_eof : AbstractStream::status_buffering;
}
if(demux.i_firstpcr == VLC_TICK_INVALID)
More information about the vlc-commits
mailing list