[FFmpeg-devel] [PATCH] cbs_h265: Fix use of an uninitialized variable

Martin Storsjö martin at martin.st
Thu May 21 11:06:09 EEST 2020


This fixes test failures in fate-cbs-hevc-* in certain configurations
since c53f9f436440be4e18.
---
Not sure if this is what was intended, but the current code doesn't
work at least.
---
 libavcodec/cbs_h265_syntax_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c
index 55da1a0a11..a3c1d1c7ca 100644
--- a/libavcodec/cbs_h265_syntax_template.c
+++ b/libavcodec/cbs_h265_syntax_template.c
@@ -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) {
-- 
2.17.1



More information about the ffmpeg-devel mailing list