History

avcodec/g2meet: fix variable shadowing

Marvin Scholz committed 2 years ago

Commit 0f87ff01 parent fd4f7d01 file · +5 −7Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/g2meet.c+5−7
@@ -1052,7 +1052,6 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, · 1051 unmodified lines
10521052 {
10531053 int width, height;
10541054 int hdr, zsize, npal, tidx = -1, ret;
1055− int i, j;
10561055 const uint8_t *src_end = src + src_size;
10571056 uint8_t pal[768], transp[3];
10581057 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, · 12 unmodified lines
10711070 hdr = *src++;
10721071 sub_type = hdr >> 5;
10731072 if (sub_type == 0) {
1074− int j;
10751073 memcpy(transp, src, 3);
10761074 src += 3;
1077− for (j = 0; j < height; j++, dst += c->framebuf_stride)
1078− for (i = 0; i < width; i++)
1075+ for (int j = 0; j < height; j++, dst += c->framebuf_stride)
1076+ for (int i = 0; i < width; i++)
10791077 memcpy(dst + i * 3, transp, 3);
10801078 return 0;
10811079 } else if (sub_type == 1) {
@@ -1093,7 +1091,7 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, · 11 unmodified lines
10931091 memcpy(pal, src, npal * 3);
10941092 src += npal * 3;
10951093 if (sub_type != 2) {
1096− for (i = 0; i < npal; i++) {
1094+ for (int i = 0; i < npal; i++) {
10971095 if (!memcmp(pal + i * 3, transp, 3)) {
10981096 tidx = i;
10991097 break;
@@ -1125,8 +1123,8 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, · 25 unmodified lines
11251123 bstride = FFALIGN(width, 16) >> 3;
11261124 // blocks are coded LSB and we need normal bitreader for JPEG data
11271125 bits = 0;
1128− for (i = 0; i < (FFALIGN(height, 16) >> 4); i++) {
1129− for (j = 0; j < (FFALIGN(width, 16) >> 4); j++) {
1126+ for (int i = 0; i < (FFALIGN(height, 16) >> 4); i++) {
1127+ for (int j = 0; j < (FFALIGN(width, 16) >> 4); j++) {
11301128 if (!bits) {
11311129 if (src >= src_end)
11321130 return AVERROR_INVALIDDATA;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t