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

James Almer jamrial at gmail.com
Fri May 22 20:18:09 EEST 2020


On 5/21/2020 5:06 AM, Martin Storsjö wrote:
> 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])

LGTM

>                  ++num_ref_pics;
>          }
>          if (num_ref_pics >= HEVC_MAX_DPB_SIZE) {
> 



More information about the ffmpeg-devel mailing list