History

avcodec/g2meet: fix variable shadowing

Marvin Scholz committed 2 years ago

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

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
1052{1052{
1053 int width, height;1053 int width, height;
1054 int hdr, zsize, npal, tidx = -1, ret;1054 int hdr, zsize, npal, tidx = -1, ret;
1055 int i, j;
1056 const uint8_t *src_end = src + src_size;1055 const uint8_t *src_end = src + src_size;
1057 uint8_t pal[768], transp[3];1056 uint8_t pal[768], transp[3];
1058 uLongf dlen = (c->tile_width + 1) * c->tile_height;1057 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
1071 hdr = *src++;1070 hdr = *src++;
1072 sub_type = hdr >> 5;1071 sub_type = hdr >> 5;
1073 if (sub_type == 0) {1072 if (sub_type == 0) {
1074 int j;
1075 memcpy(transp, src, 3);1073 memcpy(transp, src, 3);
1076 src += 3;1074 src += 3;
1077 for (j = 0; j < height; j++, dst += c->framebuf_stride)1075 for (int j = 0; j < height; j++, dst += c->framebuf_stride)
1078 for (i = 0; i < width; i++)1076 for (int i = 0; i < width; i++)
1079 memcpy(dst + i * 3, transp, 3);1077 memcpy(dst + i * 3, transp, 3);
1080 return 0;1078 return 0;
1081 } else if (sub_type == 1) {1079 } 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
1093 memcpy(pal, src, npal * 3);1091 memcpy(pal, src, npal * 3);
1094 src += npal * 3;1092 src += npal * 3;
1095 if (sub_type != 2) {1093 if (sub_type != 2) {
1096 for (i = 0; i < npal; i++) {1094 for (int i = 0; i < npal; i++) {
1097 if (!memcmp(pal + i * 3, transp, 3)) {1095 if (!memcmp(pal + i * 3, transp, 3)) {
1098 tidx = i;1096 tidx = i;
1099 break;1097 break;
@@ -1125,8 +1123,8 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, · 25 unmodified lines
1125 bstride = FFALIGN(width, 16) >> 3;1123 bstride = FFALIGN(width, 16) >> 3;
1126 // blocks are coded LSB and we need normal bitreader for JPEG data1124 // blocks are coded LSB and we need normal bitreader for JPEG data
1127 bits = 0;1125 bits = 0;
1128 for (i = 0; i < (FFALIGN(height, 16) >> 4); i++) {1126 for (int i = 0; i < (FFALIGN(height, 16) >> 4); i++) {
1129 for (j = 0; j < (FFALIGN(width, 16) >> 4); j++) {1127 for (int j = 0; j < (FFALIGN(width, 16) >> 4); j++) {
1130 if (!bits) {1128 if (!bits) {
1131 if (src >= src_end)1129 if (src >= src_end)
1132 return AVERROR_INVALIDDATA;1130 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