summaryrefslogtreecommitdiff
path: root/formats/format_ogg_vorbis.c
diff options
context:
space:
mode:
Diffstat (limited to 'formats/format_ogg_vorbis.c')
-rw-r--r--formats/format_ogg_vorbis.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c
index c0f8c197d..4fdd1c411 100644
--- a/formats/format_ogg_vorbis.c
+++ b/formats/format_ogg_vorbis.c
@@ -181,10 +181,10 @@ static int ogg_vorbis_rewrite(struct ast_filestream *s,
while (!tmp->eos) {
if (ogg_stream_flush(&tmp->os, &tmp->og) == 0)
break;
- if (!fwrite(tmp->og.header, 1, tmp->og.header_len, s->f)) {
+ if (fwrite(tmp->og.header, 1, tmp->og.header_len, s->f) != tmp->og.header_len) {
ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
}
- if (!fwrite(tmp->og.body, 1, tmp->og.body_len, s->f)) {
+ if (fwrite(tmp->og.body, 1, tmp->og.body_len, s->f) != tmp->og.body_len) {
ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
}
if (ogg_page_eos(&tmp->og))
@@ -211,10 +211,10 @@ static void write_stream(struct ogg_vorbis_desc *s, FILE *f)
if (ogg_stream_pageout(&s->os, &s->og) == 0) {
break;
}
- if (!fwrite(s->og.header, 1, s->og.header_len, f)) {
- ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ if (fwrite(s->og.header, 1, s->og.header_len, f) != s->og.header_len) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
}
- if (!fwrite(s->og.body, 1, s->og.body_len, f)) {
+ if (fwrite(s->og.body, 1, s->og.body_len, f) != s->og.body_len) {
ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
}
if (ogg_page_eos(&s->og)) {