1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

mpeg4videoenc: check w,h to be within the supported range.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-24 04:38:17 +01:00
parent 46cb61819d
commit 7e059c9c5d

View File

@ -1234,6 +1234,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
int ret;
static int done = 0;
if (avctx->width >= (1<<13) || avctx->height >= (1<<13)) {
av_log(avctx, AV_LOG_ERROR, "dimensions too large for MPEG-4\n");
return AVERROR(EINVAL);
}
if((ret=ff_MPV_encode_init(avctx)) < 0)
return ret;