diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-24 06:14:13 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-28 22:26:54 +0200 |
commit | 65f9a8e4b817d4cca8cfdd4dcdaaf2817810df61 (patch) | |
tree | 9220082c39bc08477c88d23c806a2337ea5183bc /libavformat/mov.c | |
parent | c2d853c1aae22bbc7d9905c43a9f16cb2ba3ba33 (diff) | |
download | ffmpeg-65f9a8e4b817d4cca8cfdd4dcdaaf2817810df61.tar.gz |
avformat/mov: Remove pointless EOF checks
9888ffb1ce5e0a17f711b01933d504c72ea29d3b added checks for EOF
in loops in the mov demuxer as a precaution against timeouts;
yet there is no I/O in the loop when parsing the STSZ atom
as the values are read from an already read buffer. So remove said
checks.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index a847003dc2..e95d3d2a90 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2884,7 +2884,7 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) init_get_bits(&gb, buf, 8*num_bytes); - for (i = 0; i < entries && !pb->eof_reached; i++) { + for (i = 0; i < entries; i++) { sc->sample_sizes[i] = get_bits_long(&gb, field_size); if (sc->sample_sizes[i] < 0) { av_free(buf); @@ -2898,11 +2898,6 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_free(buf); - if (pb->eof_reached) { - av_log(c->fc, AV_LOG_WARNING, "reached eof, corrupted STSZ atom\n"); - return AVERROR_EOF; - } - return 0; } |