mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
mpeg2enc: check input dimensions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d5df0df848
commit
6b0a0dc555
@ -502,6 +502,12 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (s->codec_id == CODEC_ID_MPEG2VIDEO &&
|
||||
(avctx->width > 16383 ||
|
||||
avctx->height > 16383 )) {
|
||||
av_log(avctx, AV_LOG_ERROR, "MPEG-2 does not support resolutions above 16383x16383\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");
|
||||
|
Loading…
Reference in New Issue
Block a user