This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch release/9.0
in repository ffmpeg.
The following commit(s) were added to refs/heads/release/9.0 by this push:
new 95fe88589a avformat/iamf_parse: check that num_sub_mixes and
num_audio_elements in Mix Presentations are not zero
95fe88589a is described below
commit 95fe88589a7254a8b88e76ae4eae2fe0359dc11d
Author: James Almer <[email protected]>
AuthorDate: Sat Jul 25 12:20:22 2026 -0300
Commit: James Almer <[email protected]>
CommitDate: Sun Aug 2 00:13:26 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]>
(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 62c825ffec..892145cd87 100644
--- a/libavformat/iamf_parse.c
+++ b/libavformat/iamf_parse.c
@@ -1042,6 +1042,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;
@@ -1053,6 +1059,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]