This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 1b946a3abd81bd2b50ef6d38003ddb848be7acc7 Author: James Almer <[email protected]> AuthorDate: Sat Jul 25 12:20:22 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Sat Aug 1 19:44:49 2026 -0300 avformat/iamf_parse: check that num_sub_mixes and num_audio_elements in Mix Presentations are not zero As required by the spec in Section 3.7 Signed-off-by: James Almer <[email protected]> --- libavformat/iamf_parse.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index 37d7e04f7b..3b4170b16c 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -1040,6 +1040,12 @@ static int mix_presentation_obu(void *s, IAMFContext *c, AVIOContext *pb, int le } nb_submixes = ffio_read_leb(pbc); + if (!nb_submixes) { + av_log(s, AV_LOG_ERROR, "Mix presentation %u has no submixes\n", mix_presentation_id); + ret = AVERROR_INVALIDDATA; + goto fail; + } + for (int i = 0; i < nb_submixes; i++) { AVIAMFSubmix *sub_mix; unsigned nb_elements, nb_layouts; @@ -1051,6 +1057,13 @@ static int mix_presentation_obu(void *s, IAMFContext *c, AVIOContext *pb, int le } nb_elements = ffio_read_leb(pbc); + if (!nb_elements) { + av_log(s, AV_LOG_ERROR, "Submix %d from Mix presentation %u has no audio elements\n", + i, mix_presentation_id); + ret = AVERROR_INVALIDDATA; + goto fail; + } + for (int j = 0; j < nb_elements; j++) { AVIAMFSubmixElement *submix_element; IAMFAudioElement *audio_element = NULL; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
