mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-29 18:53:02 +00:00
rawdec: use av_image_check_size
Signed-off-by: Peter Ross <pross@xvid.org> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
252746d052
commit
2d954ccd84
@ -175,10 +175,8 @@ static int raw_decode(AVCodecContext *avctx,
|
|||||||
frame->top_field_first = context->tff;
|
frame->top_field_first = context->tff;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->width <= 0 || avctx->height <= 0) {
|
if ((res = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
|
||||||
av_log(avctx, AV_LOG_ERROR, "w/h is invalid\n");
|
return res;
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
//2bpp and 4bpp raw in avi and mov (yes this is ugly ...)
|
//2bpp and 4bpp raw in avi and mov (yes this is ugly ...)
|
||||||
if (context->buffer) {
|
if (context->buffer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user