Skip to content

Commit

Permalink
avcodec/mjpegdec: Fix exif rotation->displaymatrix conversion
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mkver committed Dec 23, 2021
1 parent cfa1f0e commit b8a4b27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavcodec/mjpegdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2896,14 +2896,14 @@ int ff_mjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame)
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);
Expand Down

0 comments on commit b8a4b27

Please sign in to comment.