On 01/09/2012 04:21 PM, Laurentiu Ion wrote:
> @@ -295,16 +261,16 @@ static int decode_frame(AVCodecContext * avctx, void
> *data, int *data_size, AVPa
> return -1;
> }
>
> - header = *buf++;
> + header = bytestream2_get_byte(&g);
>
> /* blocksize 127 is really palette change event */
> - if (buf[0] == 127) {
> - buf += 3;
> + if (bytestream2_peek_byte(&g) == 127) {
> + bytestream2_skip(&g, 3);
> for (i = 0; i < 127; i++) {
> - ctx->pal[i + (header & 0x81)] = AV_RB24(buf);
> - buf += 4;
> + ctx->pal[i + (header & 0x81)] = bytestream2_get_be24(&g);
> + bytestream2_skip(&g, 1);
> }
> - buf -= 127 * 4 + 3;
> + bytestream2_seek(&g, 127 * 4 + 3, SEEK_CUR);
This is seeking in the wrong direction.
-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel