diff options
Diffstat (limited to 'formats/format_wav.c')
-rw-r--r-- | formats/format_wav.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/formats/format_wav.c b/formats/format_wav.c index 5cf39ce99..3a629df71 100644 --- a/formats/format_wav.c +++ b/formats/format_wav.c @@ -334,8 +334,11 @@ static void wav_close(struct ast_filestream *s) } /* Pad to even length */ - if (fs->bytes & 0x1) - fwrite(&zero, 1, 1, s->f); + if (fs->bytes & 0x1) { + if (!fwrite(&zero, 1, 1, s->f)) { + ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno)); + } + } } static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext) |