From b7a06885f1a7ac1d7f1ac4aec0fa329cbf3c524b Mon Sep 17 00:00:00 2001 From: James Almer Date: Wed, 9 Sep 2020 16:57:50 -0300 Subject: avcodec/av1dec: use av_cmp_q() to compare aspect ratio Signed-off-by: James Almer --- libavcodec/av1dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/av1dec.c') diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index c22606c3ef..9e71a2e5f6 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -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; -- cgit v1.2.3