This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 657882fb6e7ada163d014c0174e9ef130429a83d Author: James Almer <[email protected]> AuthorDate: Sat Jul 25 12:20:22 2026 -0300 Commit: ffmpeg-devel <[email protected]> CommitDate: Fri Aug 28 03:29:30 2026 +0000 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]> (cherry picked from commit 1b946a3abd81bd2b50ef6d38003ddb848be7acc7) --- libavformat/iamf_parse.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index 92c012ba72..8cbd7b8a42 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -1035,6 +1035,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; @@ -1046,6 +1052,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; -- 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]
