output/alsa: fix wrong use of `errno`
alsa-lib doesn't set errno, it returns errors as negative integers.
This commit is contained in:
parent
6ccc254179
commit
7f143a83c1
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue