diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-24 04:38:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-24 04:38:17 +0100 |
commit | 7e059c9c5d7885d9c41ddff4449e1b642cb1ec34 (patch) | |
tree | c20fb89672c9eec8299d7d5913656c2ce1c2a142 | |
parent | 46cb61819d867961e8f2052a8f13bcf2027d484f (diff) | |
download | ffmpeg-streaming-7e059c9c5d7885d9c41ddff4449e1b642cb1ec34.zip ffmpeg-streaming-7e059c9c5d7885d9c41ddff4449e1b642cb1ec34.tar.gz |
mpeg4videoenc: check w,h to be within the supported range.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpeg4videoenc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 0cc4df9..a07f956 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -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; |