aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-03 16:32:17 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-10-09 01:14:02 +0200
commit57f51e843e55815da5bb75ed32a81f60b7b45212 (patch)
tree786ea22fecc8f4c59afef9cb313cfcf85824c327
parentb38b6b27981aa13b5fad9b540b1ff6a7b3e8d04a (diff)
downloadffmpeg-57f51e843e55815da5bb75ed32a81f60b7b45212.tar.gz
lavf/utils: fix overestimation of the rational number density.
Fixes Ticket498 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3490270395..591a121ec2 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3049,7 +3049,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);