mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
dmix: Don't use assert() and abort()
We seem to still have some races at closing a dmix stream, but aborting is the worst option. Let's make not melt down. Reference: https://bugzilla.novell.com/show_bug.cgi?id=852446 Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
29d89ba045
commit
49ad6699e6
1 changed files with 2 additions and 2 deletions
|
|
@ -274,8 +274,8 @@ static inline int snd_pcm_direct_semaphore_up(snd_pcm_direct_t *dmix, int sem_nu
|
|||
static inline int snd_pcm_direct_semaphore_final(snd_pcm_direct_t *dmix, int sem_num)
|
||||
{
|
||||
if (dmix->locked[sem_num] != 1) {
|
||||
assert(dmix->locked[sem_num] != 1);
|
||||
abort();
|
||||
SNDMSG("invalid semaphore count to finalize %d: %d", sem_num, dmix->locked[sem_num]);
|
||||
return -EBUSY;
|
||||
}
|
||||
return snd_pcm_direct_semaphore_up(dmix, sem_num);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue