[FFmpeg-cvslog] lavf/utils: fix overestimation of the rational number density.

Michael Niedermayer git at videolan.org
Sun Oct 9 01:15:31 CEST 2011


ffmpeg | branch: release/0.8 | Michael Niedermayer <michaelni at gmx.at> | Mon Oct  3 16:32:17 2011 +0200| [a39b603bf6d8c6f47c1864100bcd4d656445194c] | committer: Carl Eugen Hoyos

lavf/utils: fix overestimation of the rational number density.
Fixes Ticket498

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

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

 libavformat/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index e79f98e..b15582a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2959,7 +2959,7 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
                 goto fail;
             }
             if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)
-               && FFABS(av_q2d(st->sample_aspect_ratio) - av_q2d(st->codec->sample_aspect_ratio)) > 0.001
+               && FFABS(av_q2d(st->sample_aspect_ratio) - av_q2d(st->codec->sample_aspect_ratio)) > 0.004*av_q2d(st->sample_aspect_ratio)
             ){
                 av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n");
                 ret = AVERROR(EINVAL);



More information about the ffmpeg-cvslog mailing list