[FFmpeg-cvslog] lavf/utils: only complain about aspect missmatch when the difference is " meassureable"

Michael Niedermayer git at videolan.org
Thu Sep 22 18:25:33 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Sep 22 18:17:28 2011 +0200| [e8d8517b160bd2dea1279d19ec0efd83e00c8c6c] | committer: Michael Niedermayer

lavf/utils: only complain about aspect missmatch when the difference is "meassureable"

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

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index ee62000..0f367b7 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3012,7 +3012,9 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
                 ret = AVERROR(EINVAL);
                 goto fail;
             }
-            if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)){
+            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
+            ){
                 av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n");
                 ret = AVERROR(EINVAL);
                 goto fail;



More information about the ffmpeg-cvslog mailing list