make xvid less picky about unkown aspect

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-03-26 19:29:37 +01:00
parent 3583eb9341
commit b0efaee6c1
1 changed files with 2 additions and 2 deletions

View File

@ -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;