mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Fixed a bug in Player where buffers may not get properly released during seeking.
This commit is contained in:
parent
afd24ca9aa
commit
fb8ad79a59
@ -514,15 +514,14 @@ void Player::OnBufferProcessed(IBuffer *buffer) {
|
||||
/* removes the specified buffer from the list of locked buffers, and also
|
||||
lets the stream know it can be recycled. */
|
||||
--pendingBufferCount;
|
||||
this->stream->OnBufferProcessedByPlayer((Buffer*)buffer);
|
||||
|
||||
/* if we're seeking this value will be non-negative, so we shouldn't touch
|
||||
the current time. */
|
||||
if (this->seekToPosition.load() == -1) {
|
||||
this->stream->OnBufferProcessedByPlayer((Buffer*)buffer);
|
||||
this->currentPosition.store(((Buffer*)buffer)->Position());
|
||||
}
|
||||
|
||||
this->currentPosition.store(((Buffer*)buffer)->Position());
|
||||
|
||||
/* did we hit any pending mixpoints? if so add them to our set and
|
||||
move them to the processed set. we'll notify once out of the
|
||||
critical section. */
|
||||
|
Loading…
Reference in New Issue
Block a user