[FFmpeg-devel] [PATCH] avformat/mov: remove superfluous realloc in mov_read_ctts()
James Almer
jamrial at gmail.com
Tue Jan 14 21:02:39 EET 2025
The array will be allocated as needed in the loop below.
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/mov.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 138120488a..1c36d7dc4a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3659,9 +3659,6 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (entries >= UINT_MAX / sizeof(*sc->ctts_data))
return AVERROR_INVALIDDATA;
av_freep(&sc->ctts_data);
- sc->ctts_data = av_fast_realloc(NULL, &sc->ctts_allocated_size, entries * sizeof(*sc->ctts_data));
- if (!sc->ctts_data)
- return AVERROR(ENOMEM);
for (i = 0; i < entries && !pb->eof_reached; i++) {
MOVCtts *ctts_data;
--
2.48.0
More information about the ffmpeg-devel
mailing list