Commit 84d42581 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptive: fix early fail handling

if no pcr was set (no valid demux or stream), never stopped
parent fd3bc0ea
......@@ -385,9 +385,14 @@ int PlaylistManager::doDemux(int64_t increment)
vlc_mutex_lock(&demux.lock);
if(demux.i_nzpcr == VLC_TS_INVALID)
{
vlc_cond_timedwait(&demux.cond, &demux.lock, mdate() + CLOCK_FREQ / 20);
bool b_dead = true;
std::vector<AbstractStream *>::const_iterator it;
for(it=streams.begin(); it!=streams.end(); ++it)
b_dead &= (*it)->isDead();
if(!b_dead)
vlc_cond_timedwait(&demux.cond, &demux.lock, mdate() + CLOCK_FREQ / 20);
vlc_mutex_unlock(&demux.lock);
return AbstractStream::status_buffering;
return (b_dead) ? AbstractStream::status_eof : AbstractStream::status_buffering;
}
if(demux.i_firstpcr == VLC_TS_INVALID)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment