Commit 7f143a83 authored by Max Kellermann's avatar Max Kellermann

output/alsa: fix wrong use of `errno`

alsa-lib doesn't set errno, it returns errors as negative integers.
parent 6ccc2541
...@@ -727,7 +727,7 @@ AlsaOutput::DrainInternal() ...@@ -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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment