diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index a10421c..19f156e 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -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_WMV1 || + s->codec_id == CODEC_ID_WMV2) && + avctx->width & 1) { + av_log(avctx, AV_LOG_ERROR, "width must be multiple of 2\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) {