This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 54502377c6ab759517692223fbd2459dd5582a79
Author:     Martin Mirchev <[email protected]>
AuthorDate: Wed Oct 21 19:03:15 2026 +0800
Commit:     James Almer <[email protected]>
CommitDate: Wed Oct 21 14:56:54 2026 +0000

    avutil/iamf: fix child_class_iterate callbacks
    
    The child_class_iterate callbacks of AVIAMFAudioElement,
    AVIAMFSubmixElement and AVIAMFMixPresentation returned their single
    child class only for a non-zero iteration state. The state starts at
    zero, so they never returned anything, and av_opt_child_class_iterate()
    and av_opt_find2() with AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ
    could not reach the AVIAMFLayer, AVIAMFParamDefinition and AVIAMFSubmix
    options from these classes.
    
    Return the child class on the first call instead.
    
    Signed-off-by: Martin Mirchev <[email protected]>
---
 libavutil/iamf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavutil/iamf.c b/libavutil/iamf.c
index 76707563cb..66c6f350f7 100644
--- a/libavutil/iamf.c
+++ b/libavutil/iamf.c
@@ -300,7 +300,7 @@ static const AVClass *audio_element_child_iterate(void 
**opaque)
     uintptr_t i = (uintptr_t)*opaque;
     const AVClass *ret = NULL;
 
-    if (i)
+    if (!i)
         ret = &layer_class;
 
     if (ret)
@@ -387,7 +387,7 @@ static const AVClass *submix_element_child_iterate(void 
**opaque)
     uintptr_t i = (uintptr_t)*opaque;
     const AVClass *ret = NULL;
 
-    if (i)
+    if (!i)
         ret = &param_definition_class;
 
     if (ret)
@@ -498,7 +498,7 @@ static const AVClass *mix_presentation_child_iterate(void 
**opaque)
     uintptr_t i = (uintptr_t)*opaque;
     const AVClass *ret = NULL;
 
-    if (i)
+    if (!i)
         ret = &submix_class;
 
     if (ret)

-- 
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]

Reply via email to