Commit e6d3351b authored by Zhao Zhili's avatar Zhao Zhili Committed by François Cartegnie

demux: adaptive: clear eof flag of CommandsQueue after seek

Signed-off-by: François Cartegnie's avatarFrancois Cartegnie <fcvlcdev@free.fr>
parent 68435065
......@@ -338,7 +338,7 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline
return AbstractStream::buffering_ongoing;
}
dead = true; /* Prevent further retries */
commandsqueue->setEOF();
commandsqueue->setEOF(true);
vlc_mutex_unlock(&lock);
return AbstractStream::buffering_end;
}
......@@ -380,7 +380,7 @@ AbstractStream::buffering_status AbstractStream::doBufferize(mtime_t nz_deadline
vlc_mutex_unlock(&lock);
return AbstractStream::buffering_ongoing;
}
commandsqueue->setEOF();
commandsqueue->setEOF(true);
vlc_mutex_unlock(&lock);
return AbstractStream::buffering_end;
}
......@@ -499,6 +499,8 @@ bool AbstractStream::setPosition(mtime_t time, bool tryonly)
if( !restartDemux() )
dead = true;
else
commandsqueue->setEOF(false);
}
else commandsqueue->Abort( true );
......
......@@ -401,11 +401,14 @@ bool CommandsQueue::isDraining() const
return b;
}
void CommandsQueue::setEOF()
void CommandsQueue::setEOF( bool b )
{
vlc_mutex_lock(&lock);
b_eof = true;
LockedSetDraining();
b_eof = b;
if( b_eof )
LockedSetDraining();
else
b_draining = false;
vlc_mutex_unlock(&lock);
}
......
......@@ -160,7 +160,7 @@ namespace adaptive
bool isEmpty() const;
void setDrop( bool );
void setDraining();
void setEOF();
void setEOF( bool );
bool isDraining() const;
bool isEOF() const;
mtime_t getDemuxedAmount() const;
......
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