diff options
author | wm4 <wm4@nowhere> | 2019-10-11 19:19:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-10-11 19:19:59 +0200 |
commit | 52f3dee16a81ca4ed4d3a5a12e5f4fbf74cc3ddb (patch) | |
tree | 9b69cf855f785d339d10a830cf4cf5f82eb1a060 /audio/out/ao_alsa.c | |
parent | 1d25d7fe922a021caa62d245437371b7bf4e44b7 (diff) | |
download | mpv-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.
Diffstat (limited to 'audio/out/ao_alsa.c')
-rw-r--r-- | audio/out/ao_alsa.c | 2 |
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; |