output/alsa: fix wrong use of `errno`

alsa-lib doesn't set errno, it returns errors as negative integers.
This commit is contained in:
Max Kellermann 2018-11-14 10:06:27 +01:00
parent 6ccc254179
commit 7f143a83c1
1 changed files with 1 additions and 1 deletions

View File

@ -727,7 +727,7 @@ AlsaOutput::DrainInternal()
/* drain period_buffer */ /* drain period_buffer */
if (!period_buffer.IsEmpty()) { if (!period_buffer.IsEmpty()) {
auto frames_written = WriteFromPeriodBuffer(); auto frames_written = WriteFromPeriodBuffer();
if (frames_written < 0 && errno != EAGAIN) { if (frames_written < 0 && frames_written != -EAGAIN) {
CancelInternal(); CancelInternal();
return true; return true;
} }