summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/indeo5.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index 52be725..0b3d946 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");
OpenPOWER on IntegriCloud