1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 01:16:45 +00:00

ao_alsa: check for EAGAIN too

Simply retry on EAGAIN.

I've seen this in several other projects; it might be just cargo-culting
though.
This commit is contained in:
wm4 2014-11-17 20:07:59 +01:00
parent 8b2798cb3e
commit fb86750a67

View File

@ -656,7 +656,7 @@ static int play(struct ao *ao, void **data, int samples, int flags)
res = snd_pcm_writei(p->alsa, data[0], samples);
}
if (res == -EINTR) {
if (res == -EINTR || res == -EAGAIN) {
/* nothing to do */
res = 0;
} else if (res == -ESTRPIPE) { /* suspend */