1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-15 19:39:05 +02:00

avcodec/av1dec: use av_cmp_q() to compare aspect ratio

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2020-09-09 16:57:50 -03:00
parent 5a562f518f
commit b7a06885f1

View File

@ -451,8 +451,7 @@ static int update_context_with_frame_header(AVCodecContext *avctx,
(int64_t)width * r_height,
INT_MAX);
if (avctx->sample_aspect_ratio.num != aspect_ratio.num ||
avctx->sample_aspect_ratio.den != aspect_ratio.den) {
if (av_cmp_q(avctx->sample_aspect_ratio, aspect_ratio)) {
ret = ff_set_sar(avctx, aspect_ratio);
if (ret < 0)
return ret;