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/nuv.c | |
parent | dccd1d2a581606f858e553b9f2a4e8aba1e460b7 (diff) |
avformat: Use ffio_read_size where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/nuv.c')
-rw-r--r-- | libavformat/nuv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/nuv.c b/libavformat/nuv.c index 1d25d3b125..73521ec8e4 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -24,6 +24,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/intfloat.h" #include "avformat.h" +#include "avio_internal.h" #include "internal.h" #include "riff.h" @@ -258,9 +259,9 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0; uint64_t pos = avio_tell(pb); - ret = avio_read(pb, hdr, HDRSIZE); - if (ret < HDRSIZE) - return ret < 0 ? ret : AVERROR(EIO); + ret = ffio_read_size(pb, hdr, HDRSIZE); + if (ret < 0) + return ret; frametype = hdr[0]; size = PKTSIZE(AV_RL32(&hdr[8])); |