diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-07-06 16:45:12 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-07-06 16:45:12 +0000 |
commit | 28bcc76ab75caee6a7f5a2bd6b8b401b359a394b (patch) | |
tree | 1fdf324d760d64d9a53d096bc19079fe06bce566 | |
parent | c79c960adea64c12e5b2f6495319401cb12da21d (diff) | |
download | ffmpeg-28bcc76ab75caee6a7f5a2bd6b8b401b359a394b.tar.gz |
Change iv_decode_frame to get AVCodecContext as argument, so that
avcodec_check_dimensions can be called with a proper context instead of NULL.
Originally committed as revision 19358 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/indeo3.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 5851e538e5..7e4cd96842 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -975,9 +975,10 @@ static av_cold int indeo3_decode_init(AVCodecContext *avctx) 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 @@ static int iv_decode_frame(Indeo3DecodeContext *s, 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 @@ static int indeo3_decode_frame(AVCodecContext *avctx, 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]) |