aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2024-09-08 23:25:51 +0200
committerMarvin Scholz <epirat07@gmail.com>2024-09-13 19:39:58 +0200
commit0f87ff0db41df2dde91f51da833316cf050a73e2 (patch)
tree377891b1267aabbdafb4f50ff9aede4a3acef4d4 /libavcodec
parentfd4f7d0d1418e014429bbd26115a55295550f6cb (diff)
downloadffmpeg-0f87ff0db41df2dde91f51da833316cf050a73e2.tar.gz
avcodec/g2meet: fix variable shadowing
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/g2meet.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 7ae987ec40..f952a06f12 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -1052,7 +1052,6 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
{
int width, height;
int hdr, zsize, npal, tidx = -1, ret;
- int i, j;
const uint8_t *src_end = src + src_size;
uint8_t pal[768], transp[3];
uLongf dlen = (c->tile_width + 1) * c->tile_height;
@@ -1071,11 +1070,10 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
hdr = *src++;
sub_type = hdr >> 5;
if (sub_type == 0) {
- int j;
memcpy(transp, src, 3);
src += 3;
- for (j = 0; j < height; j++, dst += c->framebuf_stride)
- for (i = 0; i < width; i++)
+ for (int j = 0; j < height; j++, dst += c->framebuf_stride)
+ for (int i = 0; i < width; i++)
memcpy(dst + i * 3, transp, 3);
return 0;
} else if (sub_type == 1) {
@@ -1093,7 +1091,7 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
memcpy(pal, src, npal * 3);
src += npal * 3;
if (sub_type != 2) {
- for (i = 0; i < npal; i++) {
+ for (int i = 0; i < npal; i++) {
if (!memcmp(pal + i * 3, transp, 3)) {
tidx = i;
break;
@@ -1125,8 +1123,8 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
bstride = FFALIGN(width, 16) >> 3;
// blocks are coded LSB and we need normal bitreader for JPEG data
bits = 0;
- for (i = 0; i < (FFALIGN(height, 16) >> 4); i++) {
- for (j = 0; j < (FFALIGN(width, 16) >> 4); j++) {
+ for (int i = 0; i < (FFALIGN(height, 16) >> 4); i++) {
+ for (int j = 0; j < (FFALIGN(width, 16) >> 4); j++) {
if (!bits) {
if (src >= src_end)
return AVERROR_INVALIDDATA;