On 3/17/12, Ronald S. Bultje <[email protected]> wrote:
> ---
>  libavcodec/xwddec.c |   66
> ++++++++++++++++++++++++++------------------------
>  1 files changed, 34 insertions(+), 32 deletions(-)
>
[...]
> @@ -234,8 +236,8 @@ static int xwd_decode_frame(AVCodecContext *avctx, void
> *data,
>
>      ptr = p->data[0];
>      for (i = 0; i < avctx->height; i++) {
> -        bytestream_get_buffer(&buf, ptr, rsize);
> -        buf += lsize - rsize;
> +        bytestream2_get_bufferu(&gb, ptr, rsize);
> +        bytestream2_skip(&gb, lsize - rsize);

skipu should be fine too, but anyway there is no need to optimize all checks.
This coder could have use of globabl UNCHECKED_BYTESTREAM_READER in future.

But I'm fine which ever soulution is picked.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to