diff options
author | Dudemanguy <random342@airmail.cc> | 2023-08-07 21:01:26 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-07 21:09:30 -0500 |
commit | 983e8f0100b98bd8aed48e5fe86dd5682174b04e (patch) | |
tree | 6807bf64b2bc5847467db51819af2fec1131a18c /video | |
parent | a9c0ad149f707adf8ba34c8fe1ce5859f30b0852 (diff) | |
download | mpv-983e8f0100b98bd8aed48e5fe86dd5682174b04e.tar.bz2 mpv-983e8f0100b98bd8aed48e5fe86dd5682174b04e.tar.xz |
vo_gpu_next: take into account PAR when taking screenshots
Using the width and height params directly doesn't actually work if PAR
is something other than 1. Instead, use mp_image_params_get_dsize and
calculate the correct dimensions which matches the vo_gpu behavior.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_gpu_next.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 403620fd63..7b9c477309 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1210,7 +1210,8 @@ static void video_screenshot(struct vo *vo, struct voctrl_screenshot *args) struct mp_rect src = p->src, dst = p->dst; struct mp_osd_res osd = p->osd_res; if (!args->scaled) { - int w = mpi->params.w, h = mpi->params.h; + int w, h; + mp_image_params_get_dsize(&mpi->params, &w, &h); if (mpi->params.rotate % 180 == 90) MPSWAP(int, w, h); src = dst = (struct mp_rect) {0, 0, w, h}; |