diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-22 18:17:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-22 18:19:00 +0200 |
commit | e8d8517b160bd2dea1279d19ec0efd83e00c8c6c (patch) | |
tree | b62a2b15a42a96dca292e3a73a92d58fcd942a0b | |
parent | f9bb7395a10ae44eb0f0f3f070f23124dfaee06e (diff) | |
download | ffmpeg-e8d8517b160bd2dea1279d19ec0efd83e00c8c6c.tar.gz |
lavf/utils: only complain about aspect missmatch when the difference is "meassureable"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index ee6200044b..0f367b7065 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; |