Merge commit '03dba25a4001495226651068232b4c6b1e75fd02' into release/1.1
* commit '03dba25a4001495226651068232b4c6b1e75fd02': mmvideo: check frame dimensions Conflicts: libavcodec/mmvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -60,6 +60,13 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
|
||||
|
||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||
|
||||
if (!avctx->width || !avctx->height ||
|
||||
(avctx->width & 1) || (avctx->height & 1)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
|
||||
avctx->width, avctx->height);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
avcodec_get_frame_defaults(&s->frame);
|
||||
s->frame.reference = 3;
|
||||
|
||||
|
Reference in New Issue
Block a user