Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/decode: treat orientation 1 as valid displaymatrix (PR #20447)
@ 2025-09-05 15:49 Leo Izen via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: Leo Izen via ffmpeg-devel @ 2025-09-05 15:49 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Leo Izen

PR #20447 opened by Leo Izen (Traneptora)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20447
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20447.patch

Since 9dc79241d9680fc050376bb0cc37875a41d00cc9 we now always pop the
orientation off of the IFD and use a display matrix instead. This means
we should not produce a warning and refuse if the orientation field
indicates a default orientation (i.e. 1).

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Reported-by: Ramiro Polla <ramiro.polla@gmail.com>


>From 3899fa1b53e0d3ba80ce8e26a19dfba66e449dc3 Mon Sep 17 00:00:00 2001
From: Leo Izen <leo.izen@gmail.com>
Date: Fri, 5 Sep 2025 11:44:41 -0400
Subject: [PATCH] avcodec/decode: treat orientation 1 as valid displaymatrix

Since 9dc79241d9680fc050376bb0cc37875a41d00cc9 we now always pop the
orientation off of the IFD and use a display matrix instead. This means
we should not produce a warning and refuse if the orientation field
indicates a default orientation (i.e. 1).

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Reported-by: Ramiro Polla <ramiro.polla@gmail.com>
---
 libavcodec/decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index f395948d60..ae86e270df 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -2337,7 +2337,7 @@ static int attach_displaymatrix(AVCodecContext *avctx, AVFrame *frame, int orien
     int32_t *matrix;
     int ret;
     /* invalid orientation */
-    if (orientation < 2 || orientation > 8)
+    if (orientation < 1 || orientation > 8)
         return AVERROR_INVALIDDATA;
     ret = ff_frame_new_side_data(avctx, frame, AV_FRAME_DATA_DISPLAYMATRIX, sizeof(int32_t) * 9, &sd);
     if (ret < 0) {
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-05 15:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-05 15:49 [FFmpeg-devel] [PATCH] avcodec/decode: treat orientation 1 as valid displaymatrix (PR #20447) Leo Izen via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git