Mercurial > libavcodec.hg
changeset 9926:773041579748 libavcodec
Change iv_decode_frame to get AVCodecContext as argument, so that
avcodec_check_dimensions can be called with a proper context instead of NULL.
author | reimar |
---|---|
date | Mon, 06 Jul 2009 16:45:12 +0000 |
parents | 2978d5f0ac0a |
children | f954ea120c78 |
files | indeo3.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/indeo3.c Mon Jul 06 10:28:58 2009 +0000 +++ b/indeo3.c Mon Jul 06 16:45:12 2009 +0000 @@ -975,9 +975,10 @@ return ret; } -static int iv_decode_frame(Indeo3DecodeContext *s, +static int iv_decode_frame(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { + Indeo3DecodeContext *s = avctx->priv_data; unsigned int image_width, image_height, chroma_width, chroma_height; unsigned long flags, cb_offset, data_size, @@ -994,7 +995,7 @@ image_height = bytestream_get_le16(&buf_pos); image_width = bytestream_get_le16(&buf_pos); - if(avcodec_check_dimensions(NULL, image_width, image_height)) + if(avcodec_check_dimensions(avctx, image_width, image_height)) return -1; chroma_height = ((image_height >> 2) + 3) & 0x7ffc; @@ -1070,7 +1071,7 @@ uint8_t *src, *dest; int y; - if (iv_decode_frame(s, buf, buf_size) < 0) + if (iv_decode_frame(avctx, buf, buf_size) < 0) return -1; if(s->frame.data[0])