Commit 420df8b7 authored by Rafaël Carré's avatar Rafaël Carré Committed by Anton Khirnov

avformat_write_header(): detail error message

Give the exact aspect ratios when there is a mismatch between encoder
and muxer.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent cc09dc78
......@@ -2782,7 +2782,11 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
goto fail;
}
if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)){
av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n");
av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder "
"(%d/%d) and muxer layer (%d/%d)\n",
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
st->codec->sample_aspect_ratio.num,
st->codec->sample_aspect_ratio.den);
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