diff mbox series

[FFmpeg-devel,1/3] avcodec/bsf/dts2pts: Fix shadowing

Message ID GV1P250MB0737E945B8B21F46D58262608FE62@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 4df43df6e14dc95f883cb142d814cceec1380872
Headers show
Series [FFmpeg-devel,1/3] avcodec/bsf/dts2pts: Fix shadowing | expand

Commit Message

Andreas Rheinhardt May 9, 2024, 12:36 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/bsf/dts2pts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andreas Rheinhardt May 13, 2024, 9:42 a.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/bsf/dts2pts.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/bsf/dts2pts.c b/libavcodec/bsf/dts2pts.c
> index 53a54fb1cc..ba4dc43f84 100644
> --- a/libavcodec/bsf/dts2pts.c
> +++ b/libavcodec/bsf/dts2pts.c
> @@ -269,8 +269,8 @@ static int h264_filter(AVBSFContext *ctx)
>              h264->sps.offset_for_non_ref_pic         = sps->offset_for_non_ref_pic;
>              h264->sps.offset_for_top_to_bottom_field = sps->offset_for_top_to_bottom_field;
>              h264->sps.poc_cycle_length               = sps->num_ref_frames_in_pic_order_cnt_cycle;
> -            for (int i = 0; i < h264->sps.poc_cycle_length; i++)
> -                h264->sps.offset_for_ref_frame[i] = sps->offset_for_ref_frame[i];
> +            for (int j = 0; j < h264->sps.poc_cycle_length; j++)
> +                h264->sps.offset_for_ref_frame[j] = sps->offset_for_ref_frame[j];
>  
>              h264->picture_structure = sps->frame_mbs_only_flag ? 3 :
>                                        (header->field_pic_flag ?

Will apply this patchset.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/bsf/dts2pts.c b/libavcodec/bsf/dts2pts.c
index 53a54fb1cc..ba4dc43f84 100644
--- a/libavcodec/bsf/dts2pts.c
+++ b/libavcodec/bsf/dts2pts.c
@@ -269,8 +269,8 @@  static int h264_filter(AVBSFContext *ctx)
             h264->sps.offset_for_non_ref_pic         = sps->offset_for_non_ref_pic;
             h264->sps.offset_for_top_to_bottom_field = sps->offset_for_top_to_bottom_field;
             h264->sps.poc_cycle_length               = sps->num_ref_frames_in_pic_order_cnt_cycle;
-            for (int i = 0; i < h264->sps.poc_cycle_length; i++)
-                h264->sps.offset_for_ref_frame[i] = sps->offset_for_ref_frame[i];
+            for (int j = 0; j < h264->sps.poc_cycle_length; j++)
+                h264->sps.offset_for_ref_frame[j] = sps->offset_for_ref_frame[j];
 
             h264->picture_structure = sps->frame_mbs_only_flag ? 3 :
                                       (header->field_pic_flag ?