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

Fixes Ticket498

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 13 years ago
parent bf5c3bac51
commit 85ea5c6e73
  1. 2
      libavformat/utils.c

@ -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);

Loading…
Cancel
Save