[vlc-commits] demux: adaptive: don't try to demux if everything is deselected
Francois Cartegnie
git at videolan.org
Mon Mar 30 16:15:43 CEST 2020
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May 16 18:23:45 2019 +0200| [948e88c98489e734d6cd92fecc0e9cc0f6398c24] | committer: Francois Cartegnie
demux: adaptive: don't try to demux if everything is deselected
can happen without decoders
(cherry picked from commit 46e5994dacaf1b44dadd2fe8d04e24e77f0af3b2)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=948e88c98489e734d6cd92fecc0e9cc0f6398c24
---
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 f95eb49e89..5f979f2493 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -452,13 +452,17 @@ int PlaylistManager::doDemux(int64_t increment)
if(demux.i_nzpcr == VLC_TS_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, mdate() + CLOCK_FREQ / 20);
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_TS_INVALID)
More information about the vlc-commits
mailing list