mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
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:
parent
c3e58f8fb7
commit
e21307a2b0
@ -187,13 +187,18 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
|
|||||||
|
|
||||||
if (av_cmp_q(st->sample_aspect_ratio,
|
if (av_cmp_q(st->sample_aspect_ratio,
|
||||||
codec->sample_aspect_ratio)) {
|
codec->sample_aspect_ratio)) {
|
||||||
av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between muxer "
|
if (st->sample_aspect_ratio.num != 0 &&
|
||||||
"(%d/%d) and encoder layer (%d/%d)\n",
|
st->sample_aspect_ratio.den != 0 &&
|
||||||
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
|
codec->sample_aspect_ratio.den != 0 &&
|
||||||
codec->sample_aspect_ratio.num,
|
codec->sample_aspect_ratio.den != 0) {
|
||||||
codec->sample_aspect_ratio.den);
|
av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between muxer "
|
||||||
ret = AVERROR(EINVAL);
|
"(%d/%d) and encoder layer (%d/%d)\n",
|
||||||
goto fail;
|
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
|
||||||
|
codec->sample_aspect_ratio.num,
|
||||||
|
codec->sample_aspect_ratio.den);
|
||||||
|
ret = AVERROR(EINVAL);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user