[FFmpeg-devel] [PATCH] mpegvideo_enc/rv10: width and hieght must be multiple of 16
Nicolas George
nicolas.george at normalesup.org
Thu Dec 13 17:14:29 CET 2012
Le tridi 23 frimaire, an CCXXI, Piotr Bandurski a écrit :
> 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."
Do other software play it correctly? If so, then a check on
strict_std_compliance would be in order.
> diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
> index 200c014..b81e1fa 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 -1;
Please use meaningful return values for new code: AVERROR(EINVAL) looks
appropriate here.
> + }
> +
> if ((s->codec_id == AV_CODEC_ID_WMV1 ||
> s->codec_id == AV_CODEC_ID_WMV2) &&
> avctx->width & 1) {
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121213/df3f968f/attachment.asc>
More information about the ffmpeg-devel
mailing list