[FFmpeg-cvslog] mpegvideo_enc/rv20: width and height must be multiple of 4
Piotr Bandurski
git at videolan.org
Sat Dec 15 21:32:14 CET 2012
ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Sat Dec 15 17:51:26 2012 +0100| [388241efa2dfc4937fa5c9940ed0bc078e484b9d] | committer: 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: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=388241efa2dfc4937fa5c9940ed0bc078e484b9d
---
libavcodec/mpegvideo_enc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 92bd94a..08dcf9e 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) {
More information about the ffmpeg-cvslog
mailing list