mirror of https://git.ffmpeg.org/ffmpeg.git
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavf: don't abort if both encoder and muxer aspect ratios are not set Conflicts: libavformat/mux.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
f48366c704
|
@ -273,6 +273,10 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
|
||||||
if (av_cmp_q(st->sample_aspect_ratio, codec->sample_aspect_ratio)
|
if (av_cmp_q(st->sample_aspect_ratio, codec->sample_aspect_ratio)
|
||||||
&& FFABS(av_q2d(st->sample_aspect_ratio) - av_q2d(codec->sample_aspect_ratio)) > 0.004*av_q2d(st->sample_aspect_ratio)
|
&& FFABS(av_q2d(st->sample_aspect_ratio) - av_q2d(codec->sample_aspect_ratio)) > 0.004*av_q2d(st->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 "
|
av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between muxer "
|
||||||
"(%d/%d) and encoder layer (%d/%d)\n",
|
"(%d/%d) and encoder layer (%d/%d)\n",
|
||||||
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
|
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
|
||||||
|
@ -281,6 +285,7 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
|
||||||
ret = AVERROR(EINVAL);
|
ret = AVERROR(EINVAL);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue