indeo3: check return values of allocate_frame_buffers()
Bug Found by: Diana Elena Muscalu Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8b9b6332df
commit
cd645c15d8
@ -884,7 +884,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
|
|||||||
ctx->height = height;
|
ctx->height = height;
|
||||||
|
|
||||||
free_frame_buffers(ctx);
|
free_frame_buffers(ctx);
|
||||||
allocate_frame_buffers(ctx, avctx);
|
if(allocate_frame_buffers(ctx, avctx) < 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
avcodec_set_dimensions(avctx, width, height);
|
avcodec_set_dimensions(avctx, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -984,9 +985,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
dsputil_init(&ctx->dsp, avctx);
|
dsputil_init(&ctx->dsp, avctx);
|
||||||
|
|
||||||
allocate_frame_buffers(ctx, avctx);
|
return allocate_frame_buffers(ctx, avctx);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user