diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-12-13 17:33:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-15 16:04:49 +0100 |
commit | fef75ef200975863524bd79fa498b789521f5e33 (patch) | |
tree | 7091f4586cfb64c322c959ab2da3e7cc3749dce4 /libavcodec/mpegvideo_enc.c | |
parent | fe3e0e486eb4da912f754e0ee565e43c8aab6184 (diff) | |
download | ffmpeg-streaming-fef75ef200975863524bd79fa498b789521f5e33.zip ffmpeg-streaming-fef75ef200975863524bd79fa498b789521f5e33.tar.gz |
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: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 3379090..92bd94a 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -554,6 +554,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) 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 || s->codec_id == AV_CODEC_ID_WMV2) && avctx->width & 1) { |