aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-04-21 19:54:38 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-04-25 23:22:20 +0200
commit6dd83fab44ca309b02b4ca1baea3ca9ed8b6180f (patch)
tree16ef29576ca9cc40403644ed5ba185f1e9489c5d /libavformat/mpeg.c
parent122f86d8598715d47231de25385ae266504741f2 (diff)
downloadffmpeg-6dd83fab44ca309b02b4ca1baea3ca9ed8b6180f.tar.gz
avformat: Use ffio_read_size() where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 4d732aaf86..a7a2ef78e6 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -566,9 +566,9 @@ redo:
static const unsigned char avs_seqh[4] = { 0, 0, 1, 0xb0 };
unsigned char buf[8];
- ret = avio_read(s->pb, buf, 8);
- if (ret != 8)
- return AVERROR_INVALIDDATA;
+ ret = ffio_read_size(s->pb, buf, 8);
+ if (ret < 0)
+ return ret;
avio_seek(s->pb, -8, SEEK_CUR);
if (!memcmp(buf, avs_seqh, 4) && (buf[6] != 0 || buf[7] != 1))
codec_id = AV_CODEC_ID_CAVS;