This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 948010e6ab avformat/mov: reset the ctts allocation size when freeing
ctts_data
948010e6ab is described below
commit 948010e6ab62b5fe567d9d286e324d7679d62689
Author: Martin Mirchev <[email protected]>
AuthorDate: Mon Nov 30 15:18:11 2026 +0800
Commit: James Almer <[email protected]>
CommitDate: Mon Nov 30 14:28:50 2026 +0000
avformat/mov: reset the ctts allocation size when freeing ctts_data
mov_read_ctts() frees an earlier ctts table but kept its
ctts_allocated_size, so av_fast_realloc(NULL, ...) saw a large enough
size, returned the NULL it was given, and a file with a second ctts box
in the same track failed with "Cannot allocate memory".
Reset the size along with the free, as mov_merge_tts_data() does.
Signed-off-by: Martin Mirchev <[email protected]>
---
libavformat/mov.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index bf30384e47..68b43c45c2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4159,6 +4159,7 @@ 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_allocated_size = 0;
sc->ctts_data = av_fast_realloc(NULL, &sc->ctts_allocated_size, entries *
sizeof(*sc->ctts_data));
if (!sc->ctts_data)
return AVERROR(ENOMEM);
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]