diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c index a8f5af04d0..0704da1d40 100644 --- a/libavcodec/cbs_h266_syntax_template.c +++ b/libavcodec/cbs_h266_syntax_template.c @@ -1208,7 +1208,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw, win_top_edge_ctus > current->sps_subpic_ctu_top_left_y[i] ? win_top_edge_ctus - current->sps_subpic_ctu_top_left_y[i] : 0, - MAX_UINT_BITS(wlen), 1, i); + MAX_UINT_BITS(hlen), 1, i); } else { infer(sps_subpic_height_minus1[i], tmp_height_val -