[FFmpeg-cvslog] make xvid less picky about unkown aspect

Michael Niedermayer git at videolan.org
Sun Mar 27 03:07:05 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Mar 26 19:29:37 2011 +0100| [b0efaee6c1a07b4e7575bf523542ce846202b6e2] | committer: Michael Niedermayer

make xvid less picky about unkown aspect

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0efaee6c1a07b4e7575bf523542ce846202b6e2
---

 libavcodec/libxvidff.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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;




More information about the ffmpeg-cvslog mailing list