diff options
author | Max Kellermann <max@duempel.org> | 2010-11-04 20:08:04 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-11-04 20:08:04 +0100 |
commit | 754015544f8ce40c2fd0d0e3bb8aac8a67696b45 (patch) | |
tree | 3416cca253d9eae3bba065c3c1ecf8bef908d751 /src/output | |
parent | 3f89f77429b0501aa50148dde7e7faefeea4d178 (diff) | |
download | mpd-754015544f8ce40c2fd0d0e3bb8aac8a67696b45.tar.gz mpd-754015544f8ce40c2fd0d0e3bb8aac8a67696b45.tar.xz mpd-754015544f8ce40c2fd0d0e3bb8aac8a67696b45.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/output/ffado_output_plugin.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |