summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-17 20:07:59 +0100
committerwm4 <wm4@nowhere>2014-11-17 20:07:59 +0100
commitfb86750a674a5e335a0f90fe6dfe6efdda6698b3 (patch)
treecdb667123d17382e0a2330c24d7fc839a853b6bf
parent8b2798cb3e956b3333b187b3e2b2be2be581b39f (diff)
downloadmpv-fb86750a674a5e335a0f90fe6dfe6efdda6698b3.tar.bz2
mpv-fb86750a674a5e335a0f90fe6dfe6efdda6698b3.tar.xz
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.
-rw-r--r--audio/out/ao_alsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index 8d85a0a660..b857c8fcf4 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -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 */