[FFmpeg-cvslog] avcodec/av1dec: use av_cmp_q() to compare aspect ratio

James Almer git at videolan.org
Sat Sep 12 19:51:15 EEST 2020


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Sep  9 16:57:50 2020 -0300| [b7a06885f1a7ac1d7f1ac4aec0fa329cbf3c524b] | committer: James Almer

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

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7a06885f1a7ac1d7f1ac4aec0fa329cbf3c524b
---

 libavcodec/av1dec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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;



More information about the ffmpeg-cvslog mailing list