Fix compilation warning

This commit is contained in:
Benoit Quiniou 2020-02-17 08:38:37 +01:00
parent a2aaf016a6
commit 03606e69c6
1 changed files with 5 additions and 3 deletions

View File

@ -257,12 +257,14 @@ int audio_read(audio_handle_t handle, char* buffer, size_t size)
return -EINVAL;
}
size = handle->backend->read(handle->backend, AUDIO_MAP_REVERSE_INPUT_PTR(handle, buffer), AUDIO_MAP_REVERSE_INPUT_SIZE(handle, size));
if (size < 0)
ret = handle->backend->read(handle->backend, AUDIO_MAP_REVERSE_INPUT_PTR(handle, buffer), AUDIO_MAP_REVERSE_INPUT_SIZE(handle, size));
if (ret < 0)
{
logger_log(LOG_ERROR, "%s: backend read failed", __func__);
return size;
return ret;
}
size = ret;
ret = audio_map_channels(handle, buffer, size, 1);
if (ret < 0)