diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-31 14:16:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-31 16:35:54 +0200 |
commit | 874ac0b1fdc858481aa51bdc010612d9db29083b (patch) | |
tree | 18bb44fd9bfdeb0b68ebc0d92e42829902edca9d /libavcodec | |
parent | d2a6074359b14bfd770d133c14d71e5f8e7f8a1f (diff) | |
download | ffmpeg-874ac0b1fdc858481aa51bdc010612d9db29083b.tar.gz |
indeo5: change AVCodecContext w/h when internal ones change.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/indeo5.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c index 52be725721..0b3d946588 100644 --- a/libavcodec/indeo5.c +++ b/libavcodec/indeo5.c @@ -797,6 +797,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, if (ctx->frame.data[0]) avctx->release_buffer(avctx, &ctx->frame); + if( avctx->width != ctx->planes[0].width + || avctx->height != ctx->planes[0].height) + avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height); + ctx->frame.reference = 0; if (avctx->get_buffer(avctx, &ctx->frame) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |