diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-12-15 17:51:26 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-15 21:28:45 +0100 |
commit | 388241efa2dfc4937fa5c9940ed0bc078e484b9d (patch) | |
tree | 95bb02697eba187f311afef335f86f5f59a2fa8e /libavcodec/mpegvideo_enc.c | |
parent | 0ebf85774be228866f1a500e903e87ae2d473701 (diff) | |
download | ffmpeg-388241efa2dfc4937fa5c9940ed0bc078e484b9d.tar.gz |
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: 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 92bd94acc3..08dcf9e793 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -561,6 +561,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) 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 || s->codec_id == AV_CODEC_ID_WMV2) && avctx->width & 1) { |