Commit 858b4b60 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptive: explicitely call drain from eof

parent f3068ce6
......@@ -360,8 +360,7 @@ void CommandsQueue::setDrop( bool b )
void CommandsQueue::setDraining()
{
vlc_mutex_lock(&lock);
LockedCommit();
b_draining = !commands.empty();
LockedSetDraining();
vlc_mutex_unlock(&lock);
}
......@@ -377,8 +376,7 @@ void CommandsQueue::setEOF()
{
vlc_mutex_lock(&lock);
b_eof = true;
LockedCommit();
b_draining = !commands.empty();
LockedSetDraining();
vlc_mutex_unlock(&lock);
}
......@@ -423,6 +421,12 @@ mtime_t CommandsQueue::getFirstDTS() const
return i_firstdts;
}
void CommandsQueue::LockedSetDraining()
{
LockedCommit();
b_draining = !commands.empty();
}
mtime_t CommandsQueue::getPCR() const
{
vlc_mutex_lock(const_cast<vlc_mutex_t *>(&lock));
......
......@@ -172,6 +172,7 @@ namespace adaptive
CommandsFactory *commandsFactory;
vlc_mutex_t lock;
void LockedCommit();
void LockedSetDraining();
std::list<AbstractCommand *> incoming;
std::list<AbstractCommand *> commands;
mtime_t bufferinglevel;
......
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