From b8a4b273bea57c4004f2c90fd8a7618f3757eece Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sat, 18 Dec 2021 21:15:33 +0100 Subject: [PATCH] avcodec/mjpegdec: Fix exif rotation->displaymatrix conversion The cases in which there was flipping together with a rotation that is not a multiple of the identity were wrong. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 8b154ce0ab..0dbbc14bae 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2896,14 +2896,14 @@ the_end: break; case 5: av_display_rotation_set(matrix, 90.0); - av_display_matrix_flip(matrix, 0, 1); + av_display_matrix_flip(matrix, 1, 0); break; case 6: av_display_rotation_set(matrix, 90.0); break; case 7: av_display_rotation_set(matrix, -90.0); - av_display_matrix_flip(matrix, 0, 1); + av_display_matrix_flip(matrix, 1, 0); break; case 8: av_display_rotation_set(matrix, -90.0);