diff mbox series

[FFmpeg-devel,1/2] avcodec/cbs_h266_syntax_template: Don't use uninitialized value

Message ID GV1P250MB073788E9F87733F5AC7C7E988F2AA@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit c732fdfa05949e53afc41d888ae4cd5d525d5aaf
Headers show
Series [FFmpeg-devel,1/2] avcodec/cbs_h266_syntax_template: Don't use uninitialized value | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt June 30, 2023, 9:32 p.m. UTC
Probably a typo. Fixes a warning from Clang.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/cbs_h266_syntax_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nuo Mi July 1, 2023, 2:25 p.m. UTC | #1
On Sat, Jul 1, 2023 at 5:31 AM Andreas Rheinhardt <
andreas.rheinhardt@outlook.com> wrote:

> Probably a typo. Fixes a warning from Clang.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/cbs_h266_syntax_template.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/cbs_h266_syntax_template.c
> b/libavcodec/cbs_h266_syntax_template.c
> index 863fecdefa..56e1205337 100644
> --- a/libavcodec/cbs_h266_syntax_template.c
> +++ b/libavcodec/cbs_h266_syntax_template.c
> @@ -1059,7 +1059,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx,
> RWContext *rw,
>              if (current->sps_pic_width_max_in_luma_samples > ctb_size_y)
>                  ubs(wlen, sps_subpic_width_minus1[0], 1, 0);
>              else
> -                infer(sps_subpic_width_minus1[i], tmp_width_val - 1);
> +                infer(sps_subpic_width_minus1[0], tmp_width_val - 1);
>              if (current->sps_pic_height_max_in_luma_samples > ctb_size_y)
>                  ubs(hlen, sps_subpic_height_minus1[0], 1, 0);
>              else
> --
> 2.34.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

LGTM.
It's a typo,  fixed at
https://github.com/ffvvc/FFmpeg/blob/cd27af258d2832706b6831cc3840dd69ddeeb4b5/libavcodec/cbs_h266_syntax_template.c#L1063
It may have some other misc fixes. I will send them out later.
diff mbox series

Patch

diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
index 863fecdefa..56e1205337 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -1059,7 +1059,7 @@  static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
             if (current->sps_pic_width_max_in_luma_samples > ctb_size_y)
                 ubs(wlen, sps_subpic_width_minus1[0], 1, 0);
             else
-                infer(sps_subpic_width_minus1[i], tmp_width_val - 1);
+                infer(sps_subpic_width_minus1[0], tmp_width_val - 1);
             if (current->sps_pic_height_max_in_luma_samples > ctb_size_y)
                 ubs(hlen, sps_subpic_height_minus1[0], 1, 0);
             else