mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '954aafaa961c32c655ad38fb622e8cbe249ebd5a' into release/0.10
* commit '954aafaa961c32c655ad38fb622e8cbe249ebd5a': jvdec: check frame dimensions Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
17f094697d
|
@ -42,6 +42,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||
JvContext *s = avctx->priv_data;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
if (!avctx->width || !avctx->height ||
|
||||
(avctx->width & 7) || (avctx->height & 7)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
|
||||
avctx->width, avctx->height);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue