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/kvag.c | |
parent | dccd1d2a581606f858e553b9f2a4e8aba1e460b7 (diff) |
avformat: Use ffio_read_size where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/kvag.c')
-rw-r--r-- | libavformat/kvag.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/kvag.c b/libavformat/kvag.c index 0be253fb3c..a277c28128 100644 --- a/libavformat/kvag.c +++ b/libavformat/kvag.c @@ -22,6 +22,7 @@ #include "libavutil/channel_layout.h" #include "avformat.h" +#include "avio_internal.h" #include "internal.h" #include "rawenc.h" #include "libavutil/intreadwrite.h" @@ -57,10 +58,8 @@ static int kvag_read_header(AVFormatContext *s) if (!(st = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); - if ((ret = avio_read(s->pb, buf, KVAG_HEADER_SIZE)) < 0) + if ((ret = ffio_read_size(s->pb, buf, KVAG_HEADER_SIZE)) < 0) return ret; - else if (ret != KVAG_HEADER_SIZE) - return AVERROR(EIO); hdr.magic = AV_RL32(buf + 0); hdr.data_size = AV_RL32(buf + 4); |