From 9dc79241d9680fc050376bb0cc37875a41d00cc9 Mon Sep 17 00:00:00 2001 From: James Almer Date: Thu, 21 Aug 2025 23:39:58 -0300 Subject: [PATCH] avcodec/decode: always extract display matrix from Exif in frames Should help ensure no conflicting values are propagated. Signed-off-by: James Almer --- libavcodec/decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 15ace44d78..edd2390490 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -2365,8 +2365,8 @@ static int exif_attach_ifd(AVCodecContext *avctx, AVFrame *frame, const AVExifMe } } - if (orient && orient->value.uint[0] > 1) { - av_log(avctx, AV_LOG_DEBUG, "found nontrivial EXIF orientation: %" PRIu64 "\n", orient->value.uint[0]); + if (orient) { + av_log(avctx, AV_LOG_DEBUG, "found EXIF orientation: %" PRIu64 "\n", orient->value.uint[0]); ret = attach_displaymatrix(avctx, frame, orient->value.uint[0]); if (ret < 0) { av_log(avctx, AV_LOG_WARNING, "unable to attach displaymatrix from EXIF\n");