[FFmpeg-devel] [PATCH 60/60] avfilter/drawutils: fix variable shadowing
Marvin Scholz
epirat07 at gmail.com
Mon Sep 9 03:47:18 EEST 2024
---
libavfilter/drawutils.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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;
--
2.39.3 (Apple Git-146)
More information about the ffmpeg-devel
mailing list