diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bank.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -46,6 +46,12 @@ ssize_t xas_bank_record(xas_bank *bank, size_t left = count, index_o = 0; + if (!xas_audio_format_eq(bank->format, input->format)) { + errno = EINVAL; + + goto error_invalid_format; + } + if (count > bank->entry_size) { count = bank->entry_size; } @@ -74,6 +80,7 @@ ssize_t xas_bank_record(xas_bank *bank, return entry->duration = index_o; error_audio_stream_read: +error_invalid_format: return -1; } |