avcodec/cbs_h266_syntax_template: reject subpic info with res_change_in_clvs
authorJames Almer <jamrial@gmail.com>
Mon, 8 Jun 2026 18:03:15 +0000 (20:03 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 18 Jun 2026 18:31:03 +0000 (20:31 +0200)
Found-by: Anthony Hurtado
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0cf9169c85aae8d7ca2abb25d525a91479fded67)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cbs_h266_syntax_template.c

index 4ae636e176722be7e485d7cd3d91f5cf13802977..7858266affa5a6e30968b4bab776a0447bfbfac9 100644 (file)
@@ -1133,7 +1133,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
     max_width_minus1  = tmp_width_val - 1;
     max_height_minus1 = tmp_height_val - 1;
 
-    flag(sps_subpic_info_present_flag);
+    u(1, sps_subpic_info_present_flag, 0, !current->sps_res_change_in_clvs_allowed_flag);
     if (current->sps_subpic_info_present_flag) {
         ue(sps_num_subpics_minus1, 0, VVC_MAX_SLICES - 1);
         if (current->sps_num_subpics_minus1 > 0) {