diff options
author | wm4 <wm4@nowhere> | 2018-03-16 19:36:32 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-03-16 23:00:45 +0200 |
commit | fbcf2bf207b45ca9dfb79cad6d0dc981385221a5 (patch) | |
tree | c1e4a53b0f31f340fc457d2024313abd5620b6b6 /video/out/gpu | |
parent | ebf7c040577e0280c9539ccca34655b30c04df7f (diff) | |
download | mpv-fbcf2bf207b45ca9dfb79cad6d0dc981385221a5.tar.bz2 mpv-fbcf2bf207b45ca9dfb79cad6d0dc981385221a5.tar.xz |
vo_gpu: fix anamorphic video screenshots (second try)
This passed the display size as source size to the renderer, which is of
course nonsense. I don't know what I was doing in 569383bc54.
Yet another fix for those damn anamorphic videos.
As a somewhat redundant/cosmetic change, use image_params instead of
real_image_params in the code above. They should have the same, dimensions
(but possibly different formats when doing hw decdoing), and mixing them
is confusing. p->image_params wins because it's shorter.
Actually fixes #5619.
Diffstat (limited to 'video/out/gpu')
-rw-r--r-- | video/out/gpu/video.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 2fae4021b5..693a3f274d 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -3181,16 +3181,17 @@ void gl_video_screenshot(struct gl_video *p, struct vo_frame *frame, if (!args->scaled) { int w, h; - mp_image_params_get_dsize(&p->real_image_params, &w, &h); + mp_image_params_get_dsize(&p->image_params, &w, &h); 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_rect src = {0, 0, p->image_params.w, p->image_params.h}; + struct mp_rect dst = {0, 0, w, h}; struct mp_osd_res osd = {.w = w, .h = h, .display_par = 1.0}; - gl_video_resize(p, &rc, &rc, &osd); + gl_video_resize(p, &src, &dst, &osd); } gl_video_reset_surfaces(p); |