From: Michael Niedermayer Date: Sat, 26 Mar 2011 18:29:37 +0000 (+0100) Subject: make xvid less picky about unkown aspect X-Git-Tag: n0.7.1~301 X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/b0efaee6c1a07b4e7575bf523542ce846202b6e2?ds=sidebyside make xvid less picky about unkown aspect Signed-off-by: Michael Niedermayer --- diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c index 9008b84..65069d0 100644 --- a/libavcodec/libxvidff.c +++ b/libavcodec/libxvidff.c @@ -456,8 +456,8 @@ static int xvid_encode_frame(AVCodecContext *avctx, XVID_TYPE_AUTO; /* Pixel aspect ratio setting */ - if (avctx->sample_aspect_ratio.num < 1 || avctx->sample_aspect_ratio.num > 255 || - avctx->sample_aspect_ratio.den < 1 || avctx->sample_aspect_ratio.den > 255) { + if (avctx->sample_aspect_ratio.num < 0 || avctx->sample_aspect_ratio.num > 255 || + avctx->sample_aspect_ratio.den < 0 || avctx->sample_aspect_ratio.den > 255) { av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i\n", avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den); return -1;