Commit 388241ef authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Michael Niedermayer

mpegvideo_enc/rv20: width and height must be multiple of 4

RealPlayer does not play rv20 files when sizes are not multiple of 4
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0ebf8577
...@@ -561,6 +561,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) ...@@ -561,6 +561,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
if (s->codec_id == AV_CODEC_ID_RV20 &&
(avctx->width &3 ||
avctx->height&3 )) {
av_log(avctx, AV_LOG_ERROR, "width and height must be a multiple of 4\n");
return AVERROR(EINVAL);
}
if ((s->codec_id == AV_CODEC_ID_WMV1 || if ((s->codec_id == AV_CODEC_ID_WMV1 ||
s->codec_id == AV_CODEC_ID_WMV2) && s->codec_id == AV_CODEC_ID_WMV2) &&
avctx->width & 1) { avctx->width & 1) {
......
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