diff mbox series

[FFmpeg-devel,60/60] avfilter/drawutils: fix variable shadowing

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

Commit Message

Marvin Scholz Sept. 9, 2024, 12:47 a.m. UTC
---
 libavfilter/drawutils.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 95525d38b4..b29d3e565e 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -156,7 +156,6 @@  int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
 
 void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4])
 {
-    unsigned i;
     double yuvad[4];
     double rgbad[4];
     const AVPixFmtDescriptor *desc = draw->desc;
@@ -190,7 +189,7 @@  void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4
     if (desc->nb_components <= 2)
         yuvad[1] = yuvad[3];
 
-    for (i = 0; i < desc->nb_components; i++) {
+    for (unsigned i = 0; i < desc->nb_components; i++) {
         unsigned val = yuvad[i] * ((1 << (draw->desc->comp[i].depth + draw->desc->comp[i].shift)) - 1) + 0.5;
         if (desc->comp[i].depth > 8)
             color->comp[desc->comp[i].plane].u16[desc->comp[i].offset / 2] = val;