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:
Takashi Iwai 2005-11-21 10:51:43 +00:00
parent 84ebfe7c92
commit d4bbf241ba

View file

@ -385,6 +385,12 @@ static int snd_pcm_dshare_drain(snd_pcm_t *pcm)
return 0;
}
}
if (dshare->state == SND_PCM_STATE_XRUN) {
snd_pcm_dshare_drop(pcm);
return 0;
}
stop_threshold = pcm->stop_threshold;
if (pcm->stop_threshold > pcm->buffer_size)
pcm->stop_threshold = pcm->buffer_size;