mirror of
https://review.haiku-os.org/haiku
synced 2025-01-20 21:41:28 +01:00
We didn't acquire/release a BSound reference when playing using a BSoundPlayer
which lead to #4825. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33705 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1c7348a787
commit
6fb91db708
@ -609,6 +609,7 @@ BSoundPlayer::StartPlaying(BSound *sound, bigtime_t atTime, float withVolume)
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
sound->AcquireRef();
|
||||
item->next = fPlayingSounds;
|
||||
fPlayingSounds = item;
|
||||
fLocker.Unlock();
|
||||
@ -676,6 +677,7 @@ BSoundPlayer::StopPlaying(play_id id)
|
||||
if (item->id == id) {
|
||||
*link = item->next;
|
||||
sem_id waitSem = item->wait_sem;
|
||||
item->sound->ReleaseRef();
|
||||
free(item);
|
||||
fLocker.Unlock();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user