diff mbox series

[FFmpeg-devel,47/60] avformat/yuv4mpegdec: fix variable shadowing

Message ID D41CE2FHYTBS.3QNAYFFEVHFBR@gmail.com
State New
Headers show
Series [FFmpeg-devel,01/60] fftools/ffmpeg_opt: fix variable shadowing | expand

Commit Message

Marvin Scholz Sept. 8, 2024, 11:39 p.m. UTC
---
 libavformat/yuv4mpegdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c
index 2b66a1e596..61b5a9e17b 100644
--- a/libavformat/yuv4mpegdec.c
+++ b/libavformat/yuv4mpegdec.c
@@ -36,7 +36,7 @@  static int yuv4_read_header(AVFormatContext *s)
     char header[MAX_YUV4_HEADER + 10];  // Include headroom for
                                         // the longest option
     char *tokstart, *tokend, *header_end;
-    int i;
+    size_t i;
     AVIOContext *pb = s->pb;
     int width = -1, height  = -1, raten   = 0,
         rated =  0, aspectn =  0, aspectd = 0;
@@ -197,7 +197,7 @@  static int yuv4_read_header(AVFormatContext *s)
                 };
                 // Older nonstandard pixel format representation
                 tokstart += 6;
-                for (size_t i = 0; i < FF_ARRAY_ELEMS(pix_fmt_array); i++)
+                for (i = 0; i < FF_ARRAY_ELEMS(pix_fmt_array); i++)
                     if (av_strstart(tokstart, pix_fmt_array[i].name, NULL)) {
                         alt_pix_fmt = pix_fmt_array[i].pix_fmt;
                         break;