summaryrefslogtreecommitdiff
path: root/libavformat/wavdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/wavdec.c')
-rw-r--r--libavformat/wavdec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 5992ef4bcf..30c9ac37f8 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -241,8 +241,8 @@ static inline int wav_parse_bext_string(AVFormatContext *s, const char *key,
int ret;
av_assert0(length < sizeof(temp));
- if ((ret = avio_read(s->pb, temp, length)) != length)
- return ret < 0 ? ret : AVERROR_INVALIDDATA;
+ if ((ret = ffio_read_size(s->pb, temp, length)) < 0)
+ return ret;
temp[length] = 0;
@@ -311,9 +311,9 @@ static int wav_parse_bext_tag(AVFormatContext *s, int64_t size)
if (!(coding_history = av_malloc(size + 1)))
return AVERROR(ENOMEM);
- if ((ret = avio_read(s->pb, coding_history, size)) != size) {
+ if ((ret = ffio_read_size(s->pb, coding_history, size)) < 0) {
av_free(coding_history);
- return ret < 0 ? ret : AVERROR_INVALIDDATA;
+ return ret;
}
coding_history[size] = 0;