mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
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.
This commit is contained in:
parent
8d69731871
commit
b95a10c2dd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user