make xvid less picky about unkown aspect
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 26 Mar 2011 18:29:37 +0000 (19:29 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 27 Mar 2011 00:28:06 +0000 (01:28 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libxvidff.c

index 9008b84..65069d0 100644 (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;