indeo: Sanitize ff_ivi_init_planes fail paths
[ffmpeg.git] / libavcodec / indeo4.c
index 1d68ded3ff30ac6f6a37f83eeb7666cbc72cadc2..fccb74f80a0144a0f2ba2ca83cdc4ce362e7fea0 100644 (file)
@@ -209,6 +209,7 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx)
     if (ivi_pic_config_cmp(&pic_conf, &ctx->pic_conf)) {
         if (ff_ivi_init_planes(ctx->planes, &pic_conf)) {
             av_log(avctx, AV_LOG_ERROR, "Couldn't reallocate color planes!\n");
+            ctx->pic_conf.luma_bands = 0;
             return AVERROR(ENOMEM);
         }