diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-06 22:47:22 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-06 22:47:22 +0200 |
commit | d1ac6456369fecdc99044e69bb22130bbedc0558 (patch) | |
tree | af3374b2037931e6c37ababaedbc553d8432f824 /libavformat/wavdec.c | |
parent | dccd1d2a581606f858e553b9f2a4e8aba1e460b7 (diff) |
avformat: Use ffio_read_size where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/wavdec.c')
-rw-r--r-- | libavformat/wavdec.c | 8 |
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; |