diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-22 18:17:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-01 19:30:49 +0200 |
commit | 3aad92f3e649dcc4f92c805291afb128c663efd3 (patch) | |
tree | c74407e521d61327f67b9b52dc44755996273b83 | |
parent | 0d68a6f72d8c2ff02ad3f83522ad17123bf1c4e5 (diff) | |
download | ffmpeg-3aad92f3e649dcc4f92c805291afb128c663efd3.tar.gz |
lavf/utils: only complain about aspect missmatch when the difference is "meassureable"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e8d8517b160bd2dea1279d19ec0efd83e00c8c6c)
-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 40f0089c77..eaa8bd901f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2958,7 +2958,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; |