From 996fe4fab6f96870c86d42e850f9636617462511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96nnerby?= Date: Sat, 27 Dec 2008 08:07:58 +0000 Subject: [PATCH] Last checking did not exit the audio::Player. --- src/core/audio/Player.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/core/audio/Player.cpp b/src/core/audio/Player.cpp index 89721ba08..db2b490bb 100644 --- a/src/core/audio/Player.cpp +++ b/src/core/audio/Player.cpp @@ -309,18 +309,13 @@ bool Player::Exited(){ void Player::ReleaseBuffer(IBuffer *buffer){ boost::mutex::scoped_lock lock(this->mutex); - - if( this->state==Player::Quit ){ - // Just in case that the stream and outputs have already been reset and output-plugin is still releasing buffers. - this->waitCondition.notify_all(); - return; - } - // Remove the buffer from lockedBuffers for(BufferList::iterator foundBuffer=this->lockedBuffers.begin();foundBuffer!=this->lockedBuffers.end();++foundBuffer){ if(foundBuffer->get()==buffer){ this->totalBufferSize -= buffer->Bytes(); - this->stream->DeleteBuffer(*foundBuffer); + if( this->stream ){ + this->stream->DeleteBuffer(*foundBuffer); + } this->lockedBuffers.erase(foundBuffer); // Calculate current position from front locked buffer