summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-29 11:47:16 +0200
committerwm4 <wm4@nowhere>2016-03-29 11:47:16 +0200
commitb95a10c2dd9d73d13375de1c802c2124478f6d88 (patch)
tree9eaa9a0e84aa51543e7b978c191ee44733dc7879
parent8d6973187126d0ba6c9344c3db01144d0c3fac1e (diff)
downloadmpv-b95a10c2dd9d73d13375de1c802c2124478f6d88.tar.bz2
mpv-b95a10c2dd9d73d13375de1c802c2124478f6d88.tar.xz
vo_opengl: fix rotation direction
The recent changes fixed rotation handling, but reversed the rotation direction. The direction is expected to be counter-clockwise, because demuxers export video rotation metadata as such.
-rw-r--r--video/out/opengl/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 2c1b3f1ce5..de9fdd2814 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -1763,7 +1763,7 @@ static void compute_src_transform(struct gl_video *p, struct gl_transform *tr)
int a = p->image_params.rotate % 90 ? 0 : p->image_params.rotate / 90;
int sin90[4] = {0, 1, 0, -1}; // just to avoid rounding issues etc.
int cos90[4] = {1, 0, -1, 0};
- struct gl_transform rot = {{{cos90[a], -sin90[a]}, {sin90[a], cos90[a]}}};
+ struct gl_transform rot = {{{cos90[a], sin90[a]}, {-sin90[a], cos90[a]}}};
gl_transform_trans(rot, &transform);
// basically, recenter to keep the whole image in view