1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00

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.
This commit is contained in:
wm4 2019-10-11 19:19:59 +02:00
parent 1d25d7fe92
commit 52f3dee16a

View File

@ -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;