The branch, release/8.0 has been updated
via e219c8f77b28ee9c2d776860a5fabc490790572b (commit)
from 140fd653aed8cad774f991ba083e2d01e86420c7 (commit)
- Log -----------------------------------------------------------------
commit e219c8f77b28ee9c2d776860a5fabc490790572b
Author: Damiano Galassi <[email protected]>
AuthorDate: Fri Aug 22 17:01:26 2025 +0200
Commit: James Almer <[email protected]>
CommitDate: Sun Aug 24 10:32:33 2025 -0300
movenc: ensure chapters track extradata is not null and populated
fix a regression introduced in 4eca8df,
writing chapters failed if chapters where
not available before mov_write_header().
(cherry picked from commit b2f5bc7fd33c5412d305b3327fbd40c527cb6e9e)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 585a018e35..efd6329d70 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -7463,6 +7463,14 @@ static int mov_create_chapter_track(AVFormatContext *s,
int tracknum)
return ret;
memcpy(track->par->extradata, stub_header, sizeof(stub_header));
+ if (track->extradata == NULL) {
+ track->stsd_count = 1;
+ track->extradata = av_calloc(1, sizeof(*track->extradata));
+ track->extradata_size = av_calloc(1, sizeof(*track->extradata_size));
+ if (!track->extradata || !track->extradata_size)
+ return AVERROR(ENOMEM);
+ }
+
track->extradata[0] = av_memdup(stub_header, sizeof(stub_header));
if (!track->extradata[0])
return AVERROR(ENOMEM);
-----------------------------------------------------------------------
Summary of changes:
libavformat/movenc.c | 8 ++++++++
1 file changed, 8 insertions(+)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]