From 754015544f8ce40c2fd0d0e3bb8aac8a67696b45 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Nov 2010 20:08:04 +0100 Subject: [PATCH] output/ffado: transfer_playback_buffers() returns a boolean libffado documentation says this function returns -1 on error, but that is a lie - it returns a boolean value, and "false" means error. --- src/output/ffado_output_plugin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/output/ffado_output_plugin.c b/src/output/ffado_output_plugin.c index 588957d26..723698ed0 100644 --- a/src/output/ffado_output_plugin.c +++ b/src/output/ffado_output_plugin.c @@ -325,7 +325,10 @@ ffado_play(void *data, const void *chunk, size_t size, GError **error_r) /* if buffer full, transfer to device */ if (fd->buffer_position >= fd->period_size && - ffado_streaming_transfer_playback_buffers(fd->dev) != 0) { + /* libffado documentation says this function returns -1 on + error, but that is a lie - it returns a boolean value, + and "false" means error */ + !ffado_streaming_transfer_playback_buffers(fd->dev)) { g_set_error(error_r, ffado_output_quark(), 0, "ffado_streaming_transfer_playback_buffers() failed"); return 0;