1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00

vo_gpu: fix taking screenshots of rotated videos

Good old 90° rotation logic messing everything up.
This commit is contained in:
wm4 2018-03-02 12:13:21 +01:00 committed by Jan Ekström
parent 628805866d
commit 1b786a71c1

View File

@ -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);