[FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h266_syntax_template: Avoid shadowing

Nuo Mi nuomi2021 at gmail.com
Sat Jul 1 17:37:43 EEST 2023


On Sat, Jul 1, 2023 at 6:07 AM Andreas Rheinhardt <
andreas.rheinhardt at outlook.com> wrote:

> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavcodec/cbs_h266_syntax_template.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/cbs_h266_syntax_template.c
> b/libavcodec/cbs_h266_syntax_template.c
> index a329b7f9ed..646cd94413 100644
> --- a/libavcodec/cbs_h266_syntax_template.c
> +++ b/libavcodec/cbs_h266_syntax_template.c
> @@ -514,9 +514,9 @@ static int FUNC(ref_pic_lists) (CodedBitstreamContext
> *ctx, RWContext *rw,
>          ref_list = &current->rpl_ref_list[i];
>
>          num_ltrp_entries = 0;
> -        for (int i = 0; i < ref_list->num_ref_entries; i++) {
> -            if (!ref_list->inter_layer_ref_pic_flag[i]) {
> -                if (!ref_list->st_ref_pic_flag[i]) {
> +        for (int k = 0; k < ref_list->num_ref_entries; k++) {
> +            if (!ref_list->inter_layer_ref_pic_flag[k]) {
> +                if (!ref_list->st_ref_pic_flag[k]) {
>                      num_ltrp_entries++;
>                  }
>              }
> --
> 2.34.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
:) LGTM


More information about the ffmpeg-devel mailing list