mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
Abort from snd_pcm_dshare_drain in XRUN state
Fixed the hang-up in snd_pcm_dshare_drain() when the state is XRUN.
This commit is contained in:
parent
84ebfe7c92
commit
d4bbf241ba
1 changed files with 6 additions and 0 deletions
|
|
@ -385,6 +385,12 @@ static int snd_pcm_dshare_drain(snd_pcm_t *pcm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dshare->state == SND_PCM_STATE_XRUN) {
|
||||||
|
snd_pcm_dshare_drop(pcm);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
stop_threshold = pcm->stop_threshold;
|
stop_threshold = pcm->stop_threshold;
|
||||||
if (pcm->stop_threshold > pcm->buffer_size)
|
if (pcm->stop_threshold > pcm->buffer_size)
|
||||||
pcm->stop_threshold = pcm->buffer_size;
|
pcm->stop_threshold = pcm->buffer_size;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue