aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2018-03-02 12:13:21 +0100
committerGravatar Jan Ekström <jeebjp@gmail.com>2018-03-03 02:38:01 +0200
commit1b786a71c1ddcfc4bf519b26bb978d1f4f29c26f (patch)
tree07103c35fa85d0899d760f4c5117e0f8eebb802e /video
parent628805866de9a70be9def918e9d7fa22bb07559a (diff)
vo_gpu: fix taking screenshots of rotated videos
Good old 90° rotation logic messing everything up.
Diffstat (limited to 'video')
-rw-r--r--video/out/gpu/video.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index 4e9f6d5e27..11c984615d 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -3184,6 +3184,9 @@ void gl_video_screenshot(struct gl_video *p, struct vo_frame *frame,
if (w < 1 || h < 1)
return;
+ if (p->image_params.rotate % 180 == 90)
+ MPSWAP(int, w, h);
+
struct mp_rect rc = {0, 0, w, h};
struct mp_osd_res osd = {.w = w, .h = h, .display_par = 1.0};
gl_video_resize(p, &rc, &rc, &osd);