Commit e8d8517b authored by Michael Niedermayer's avatar Michael Niedermayer

lavf/utils: only complain about aspect missmatch when the difference is "meassureable"

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f9bb7395
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment