diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-12 18:47:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-12 18:49:34 +0200 |
commit | 70f133fb54bfa92c1a57147ba3ff606c1daddaff (patch) | |
tree | 616321929a982d800131fbc062012082a6528d48 /libavcodec | |
parent | 9188294d30c20e43adcebe35fc07b90e1257724f (diff) | |
download | ffmpeg-70f133fb54bfa92c1a57147ba3ff606c1daddaff.tar.gz |
h263enc: check w/h for validity
Fixes Ticket1063
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 15fa9a22b8..a10421cecc 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -480,6 +480,14 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den, 255); } + if ((s->codec_id == CODEC_ID_H263 || + s->codec_id == CODEC_ID_H263P) && + (avctx->width > 2048 || + avctx->height > 1152 )) { + av_log(avctx, AV_LOG_ERROR, "H.263 does not support resolutions above 2048x1152\n"); + return -1; + } + if ((s->flags & (CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME)) && s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n"); |