cbs_h265: Fix use of an uninitialized variable
authorMartin Storsjö <martin@martin.st>
Thu, 21 May 2020 08:03:35 +0000 (11:03 +0300)
committerMartin Storsjö <martin@martin.st>
Fri, 22 May 2020 18:01:29 +0000 (21:01 +0300)
This fixes test failures in fate-cbs-hevc-* in certain configurations
since c53f9f436440be4e18.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/cbs_h265_syntax_template.c

index 06a8e1c..5b7d1aa 100644 (file)
@@ -552,7 +552,7 @@ static int FUNC(st_ref_pic_set)(CodedBitstreamContext *ctx, RWContext *rw,
                 flags(use_delta_flag[j], 1, j);
             else
                 infer(use_delta_flag[j], 1);
-            if (current->use_delta_flag[i])
+            if (current->use_delta_flag[j])
                 ++num_ref_pics;
         }
         if (num_ref_pics >= HEVC_MAX_DPB_SIZE) {