Commit 2d954ccd authored by Peter Ross's avatar Peter Ross Committed by Michael Niedermayer

rawdec: use av_image_check_size

Signed-off-by: 's avatarPeter Ross <pross@xvid.org>
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 252746d0
......@@ -175,10 +175,8 @@ static int raw_decode(AVCodecContext *avctx,
frame->top_field_first = context->tff;
}
if (avctx->width <= 0 || avctx->height <= 0) {
av_log(avctx, AV_LOG_ERROR, "w/h is invalid\n");
return AVERROR(EINVAL);
}
if ((res = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
return res;
//2bpp and 4bpp raw in avi and mov (yes this is ugly ...)
if (context->buffer) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment