Commit f153dfc9 authored by Michael Niedermayer's avatar Michael Niedermayer

h263enc: test that dimensions are a multiple of 4

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1caf614b
......@@ -487,6 +487,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "H.263 does not support resolutions above 2048x1152\n");
return -1;
}
if ((s->codec_id == CODEC_ID_H263 ||
s->codec_id == CODEC_ID_H263P) &&
((avctx->width &3) ||
(avctx->height&3) )) {
av_log(avctx, AV_LOG_ERROR, "w/h must be a multiple of 4\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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment