Commit fef75ef2 authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Michael Niedermayer

mpegvideo_enc/rv10: width and hieghtmust be multiple of 16

RealPlayer does not play correctly rv10 files when sizes are not multiple of 16

"RealVideo Encoder 1.0 supports any size image that is a multiple of sixteen pixels."
Reviewed-by: 's avatarNicolas George <nicolas.george@normalesup.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent fe3e0e48
...@@ -554,6 +554,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) ...@@ -554,6 +554,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
return -1; return -1;
} }
if (s->codec_id == AV_CODEC_ID_RV10 &&
(avctx->width &15 ||
avctx->height&15 )) {
av_log(avctx, AV_LOG_ERROR, "width and height must be a multiple of 16\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