# HG changeset patch # User reimar # Date 1239957728 0 # Node ID b5bc4764ff7a22100b47e79f9e3b5103292a9264 # Parent 42803399ba8acc8f3c68509ce9e01a161fee5e61 Change tgq_decode_mb function arguments from using int8_t to uint8_t, this does not really change the code (x86_64/gcc-4.3.3 results stay unchanged) but avoids several casts and an aliasing violation that broke decoding at least on PPC64/gcc-4.1.2. diff -r 42803399ba8a -r b5bc4764ff7a eatgq.c --- a/eatgq.c Fri Apr 17 08:39:11 2009 +0000 +++ b/eatgq.c Fri Apr 17 08:42:08 2009 +0000 @@ -140,13 +140,13 @@ } } -static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x, const int8_t **bs, const int8_t *buf_end){ +static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x, const uint8_t **bs, const uint8_t *buf_end){ int mode; int i; int8_t dc[6]; DCTELEM block[6][64]; - mode = bytestream_get_byte((const uint8_t**)bs); + mode = bytestream_get_byte(bs); if (mode>buf_end-*bs) { av_log(s->avctx, AV_LOG_ERROR, "truncated macroblock\n"); return; @@ -228,7 +228,7 @@ for (y=0; y<(avctx->height+15)/16; y++) for (x=0; x<(avctx->width+15)/16; x++) - tgq_decode_mb(s, y, x, (const int8_t**)&buf, (const int8_t*)buf_end); + tgq_decode_mb(s, y, x, &buf, buf_end); *data_size = sizeof(AVFrame); *(AVFrame*)data = s->frame;