lavf: don't abort if both encoder and muxer aspect ratios are not set

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Rafaël Carré 2013-06-23 23:00:34 +02:00 committed by Anton Khirnov
parent c3e58f8fb7
commit e21307a2b0
1 changed files with 12 additions and 7 deletions

View File

@ -187,6 +187,10 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
if (av_cmp_q(st->sample_aspect_ratio,
codec->sample_aspect_ratio)) {
if (st->sample_aspect_ratio.num != 0 &&
st->sample_aspect_ratio.den != 0 &&
codec->sample_aspect_ratio.den != 0 &&
codec->sample_aspect_ratio.den != 0) {
av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between muxer "
"(%d/%d) and encoder layer (%d/%d)\n",
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
@ -195,6 +199,7 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
ret = AVERROR(EINVAL);
goto fail;
}
}
break;
}