diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-05-02 12:34:24 -0400 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-05-02 11:36:13 -0500 |
commit | 7f5ce428edc1087a77024a638dce6a63af02ce36 (patch) | |
tree | 35454783e164e3d00fd578d46bef32180c10c7cb | |
parent | 956f4624313344ca76d3de8434b639460f9adc48 (diff) |
cleanup: Change severity of fread short-read warning
Many sound files don't have a full frame's worth of data at EOF, so the
warning messages were a bit too noisy. So we demote them to debug
messages.
Change-Id: I6b617467d687658adca39170a81797a11cc766f6
-rw-r--r-- | formats/format_g719.c | 6 | ||||
-rw-r--r-- | formats/format_g723.c | 6 | ||||
-rw-r--r-- | formats/format_g726.c | 6 | ||||
-rw-r--r-- | formats/format_g729.c | 6 | ||||
-rw-r--r-- | formats/format_gsm.c | 6 | ||||
-rw-r--r-- | formats/format_h263.c | 6 | ||||
-rw-r--r-- | formats/format_h264.c | 6 | ||||
-rw-r--r-- | formats/format_ilbc.c | 6 | ||||
-rw-r--r-- | formats/format_pcm.c | 6 | ||||
-rw-r--r-- | formats/format_siren14.c | 6 | ||||
-rw-r--r-- | formats/format_siren7.c | 6 | ||||
-rw-r--r-- | formats/format_sln.c | 6 | ||||
-rw-r--r-- | formats/format_vox.c | 6 | ||||
-rw-r--r-- | formats/format_wav.c | 6 | ||||
-rw-r--r-- | formats/format_wav_gsm.c | 6 |
15 files changed, 45 insertions, 45 deletions
diff --git a/formats/format_g719.c b/formats/format_g719.c index 62e8c40c3..bc374ee45 100644 --- a/formats/format_g719.c +++ b/formats/format_g719.c @@ -49,9 +49,9 @@ static struct ast_frame *g719read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_g723.c b/formats/format_g723.c index 79d241b12..22e39927a 100644 --- a/formats/format_g723.c +++ b/formats/format_g723.c @@ -69,9 +69,9 @@ static struct ast_frame *g723_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_g726.c b/formats/format_g726.c index b2d34e6fe..4d5a91a8f 100644 --- a/formats/format_g726.c +++ b/formats/format_g726.c @@ -128,9 +128,9 @@ static struct ast_frame *g726_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_g729.c b/formats/format_g729.c index f1bc79e67..44a466fac 100644 --- a/formats/format_g729.c +++ b/formats/format_g729.c @@ -55,9 +55,9 @@ static struct ast_frame *g729_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_gsm.c b/formats/format_gsm.c index 12074b761..7e7c54da3 100644 --- a/formats/format_gsm.c +++ b/formats/format_gsm.c @@ -61,9 +61,9 @@ static struct ast_frame *gsm_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, GSM_FRAME_SIZE, s->f)) != GSM_FRAME_SIZE) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), GSM_FRAME_SIZE, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), GSM_FRAME_SIZE, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_h263.c b/formats/format_h263.c index d008d61cd..a3ca93346 100644 --- a/formats/format_h263.c +++ b/formats/format_h263.c @@ -89,9 +89,9 @@ static struct ast_frame *h263_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_h264.c b/formats/format_h264.c index 1b62e492c..b89e8ec81 100644 --- a/formats/format_h264.c +++ b/formats/format_h264.c @@ -81,9 +81,9 @@ static struct ast_frame *h264_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c index ff88d5005..3103611c0 100644 --- a/formats/format_ilbc.c +++ b/formats/format_ilbc.c @@ -53,9 +53,9 @@ static struct ast_frame *ilbc_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_pcm.c b/formats/format_pcm.c index b2cd20dad..705a03530 100644 --- a/formats/format_pcm.c +++ b/formats/format_pcm.c @@ -88,9 +88,9 @@ static struct ast_frame *pcm_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_siren14.c b/formats/format_siren14.c index 1f013d21c..15cbe4cfd 100644 --- a/formats/format_siren14.c +++ b/formats/format_siren14.c @@ -49,9 +49,9 @@ static struct ast_frame *siren14read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_siren7.c b/formats/format_siren7.c index 38c7512b5..ff0bca3b4 100644 --- a/formats/format_siren7.c +++ b/formats/format_siren7.c @@ -49,9 +49,9 @@ static struct ast_frame *siren7read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_sln.c b/formats/format_sln.c index dff25d1a7..f68becb0f 100644 --- a/formats/format_sln.c +++ b/formats/format_sln.c @@ -43,9 +43,9 @@ static struct ast_frame *generic_read(struct ast_filestream *s, int *whennext, u if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_vox.c b/formats/format_vox.c index 94b37bf3c..fc840530f 100644 --- a/formats/format_vox.c +++ b/formats/format_vox.c @@ -49,9 +49,9 @@ static struct ast_frame *vox_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_wav.c b/formats/format_wav.c index 63df6357c..85a22ed8a 100644 --- a/formats/format_wav.c +++ b/formats/format_wav.c @@ -396,9 +396,9 @@ static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext) if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c index 049cecaaf..e480179dd 100644 --- a/formats/format_wav_gsm.c +++ b/formats/format_wav_gsm.c @@ -426,9 +426,9 @@ static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext) if ((res = fread(msdata, 1, MSGSM_FRAME_SIZE, s->f)) != MSGSM_FRAME_SIZE) { if (feof(s->f)) { if (res) { - ast_log(LOG_WARNING, "Incomplete frame data at end of %s file " - "(expected %d bytes, read %d)\n", - ast_format_get_name(s->fr.subclass.format), MSGSM_FRAME_SIZE, res); + ast_debug(3, "Incomplete frame data at end of %s file " + "(expected %d bytes, read %d)\n", + ast_format_get_name(s->fr.subclass.format), MSGSM_FRAME_SIZE, res); } } else { ast_log(LOG_ERROR, "Error while reading %s file: %s\n", |