Merge commit 'a801453423420915425f902bf9f9cbe982a55d87'

* commit 'a801453423420915425f902bf9f9cbe982a55d87':
  g2meet: K&R formatting cosmetics

Conflicts:
	libavcodec/g2meet.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-03-09 00:41:47 +01:00
commit 17a5dbacf5

View File

@ -381,7 +381,8 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y,
npal = *src++ + 1;
if (src_end - src < npal * 3)
return AVERROR_INVALIDDATA;
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)) {
@ -393,7 +394,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 + (sub_type != 2))
return AVERROR_INVALIDDATA;
@ -558,16 +560,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;
@ -848,9 +856,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;
}