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

Fixes Ticket498

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-10-03 16:32:17 +02:00
parent bf5c3bac51
commit 85ea5c6e73
1 changed files with 1 additions and 1 deletions

View File

@ -3016,7 +3016,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);