Commit 54502377c6 for ffmpeg

commit 54502377c6ab759517692223fbd2459dd5582a79
Author: Martin Mirchev <mmirchev@comp.nus.edu.sg>
Date:   Wed Oct 21 19:03:15 2026 +0800

    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 <mmirchev@comp.nus.edu.sg>

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)