summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-11 19:19:59 +0200
committerwm4 <wm4@nowhere>2019-10-11 19:19:59 +0200
commit52f3dee16a81ca4ed4d3a5a12e5f4fbf74cc3ddb (patch)
tree9b69cf855f785d339d10a830cf4cf5f82eb1a060
parent1d25d7fe922a021caa62d245437371b7bf4e44b7 (diff)
downloadmpv-52f3dee16a81ca4ed4d3a5a12e5f4fbf74cc3ddb.tar.bz2
mpv-52f3dee16a81ca4ed4d3a5a12e5f4fbf74cc3ddb.tar.xz
ao_alsa: handle underruns in get_space() too
This is essentially optional. But it will give the higher level code a better guarantee that underruns were tested.
-rw-r--r--audio/out/ao_alsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index 3185cb4c4b..275f5c08a0 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -970,6 +970,8 @@ static int get_space(struct ao *ao)
check_device_present(ao, space);
goto alsa_error;
}
+ if (space == -EPIPE)
+ handle_underrun(ao);
if (space > p->buffersize || space < 0) // Buffer underrun?
space = p->buffersize;