1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

g2meet: K&R formatting cosmetics

This commit is contained in:
Diego Biurrun 2014-03-07 15:15:02 +01:00
parent f87a6e500b
commit a801453423

View File

@ -379,7 +379,8 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
src += 3;
}
npal = *src++ + 1;
memcpy(pal, src, npal * 3); src += npal * 3;
memcpy(pal, src, npal * 3);
src += npal * 3;
if (sub_type != 2) {
for (i = 0; i < npal; i++) {
if (!memcmp(pal + i * 3, transp, 3)) {
@ -391,7 +392,8 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
if (src_end - src < 2)
return 0;
zsize = (src[0] << 8) | src[1]; src += 2;
zsize = (src[0] << 8) | src[1];
src += 2;
if (src_end - src < zsize)
return AVERROR_INVALIDDATA;
@ -555,16 +557,22 @@ static int g2m_load_cursor(AVCodecContext *avctx, G2MContext *c,
int mask_bit = !!(bits & 0x80000000);
switch (dst[0] * 2 + mask_bit) {
case 0:
dst[0] = 0xFF; dst[1] = 0x00;
dst[2] = 0x00; dst[3] = 0x00;
dst[0] = 0xFF;
dst[1] = 0x00;
dst[2] = 0x00;
dst[3] = 0x00;
break;
case 1:
dst[0] = 0xFF; dst[1] = 0xFF;
dst[2] = 0xFF; dst[3] = 0xFF;
dst[0] = 0xFF;
dst[1] = 0xFF;
dst[2] = 0xFF;
dst[3] = 0xFF;
break;
default:
dst[0] = 0x00; dst[1] = 0x00;
dst[2] = 0x00; dst[3] = 0x00;
dst[0] = 0x00;
dst[1] = 0x00;
dst[2] = 0x00;
dst[3] = 0x00;
}
dst += 4;
bits <<= 1;
@ -841,9 +849,12 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
}
return buf_size;
header_fail:
c->width = c->height = 0;
c->tiles_x = c->tiles_y = 0;
c->width =
c->height = 0;
c->tiles_x =
c->tiles_y = 0;
return ret;
}