Commit 604ef3784d for ffmpeg

commit 604ef3784d6fae44baf62fdbe9b3e4e5cfc3c681
Author: Jun Zhao <barryjzhao@tencent.com>
Date:   Sat Nov 14 12:45:04 2026 +0800

    avcodec/cbs_h266: do not reject an OLS without output layers

    The check added in 9ef20920ab rejects valid JVET conformance streams such
    as VPS_C_2, where vps_ols_mode_idc == 2 and the last OLS has no output
    layer.  Log at debug level instead of failing; the num_multi_layer_olss
    check below still guards the DPB parameter loop against out-of-bounds
    access.

    Signed-off-by: Jun Zhao <barryjzhao@tencent.com>

diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
index 99c35873a8..492bfa16b0 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -907,7 +907,8 @@ static int FUNC(vps) (CodedBitstreamContext *ctx, RWContext *rw,
                 }
             }
             if (!num_output_layers_in_ols[i])
-                return AVERROR_INVALIDDATA;
+                av_log(ctx->log_ctx, AV_LOG_DEBUG,
+                       "OLS %d has no output layers.\n", i);
         }
         for (i = 1; i < total_num_olss; i++) {
             int num_layers_in_ols = 0;