ref: 2882b3f907a0b27ce880f4ba4a79ce93a57d2856
parent: a6222fcdefa4aa0fdfc1fa35748a698454ced1cb
author: Paul Brossier <piem@piem.org>
date: Sun Feb 26 20:33:21 EST 2017
src/io/source_wavread.c: allow closing twice
--- a/src/io/source_wavread.c
+++ b/src/io/source_wavread.c
@@ -439,8 +439,8 @@
}
uint_t aubio_source_wavread_close (aubio_source_wavread_t * s) {
- if (!s->fid) {
- return AUBIO_FAIL;
+ if (s->fid == NULL) {
+ return AUBIO_OK;
}
if (fclose(s->fid)) {
AUBIO_ERR("source_wavread: could not close %s (%s)\n", s->path, strerror(errno));