From f52056b76da180bd3a04365e7da178f15cdb44a7 Mon Sep 17 00:00:00 2001 From: llyyr Date: Fri, 1 Sep 2023 00:46:03 +0530 Subject: Revert "aspect: change --video-pan-x/y to be relative to the destination rect" There are way too many preexisting scripts that rely on this behavior for video panning, like for example scripts that allow you to use mpv as an image viewer. If this behavior is desired then it may be better to add a new option for panning relative to the destination instead. The restriction of video-pan-x/y being clamped to {-3, 3} also results in the video being impossible to pan if it was zoomed in beyond a certain degree. This reverts commit 7d6f9e37397ed57be0f1375afe8fddfc451aa152. --- video/out/aspect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/aspect.c b/video/out/aspect.c index 84fdb13b69..2e34419118 100644 --- a/video/out/aspect.c +++ b/video/out/aspect.c @@ -86,7 +86,7 @@ static void src_dst_split_scaling(int src_size, int dst_size, scaled_src_size = MPMAX(scaled_src_size, 1); align = (align + 1) / 2; - *dst_start = (dst_size - scaled_src_size) * align + pan * dst_size; + *dst_start = (dst_size - scaled_src_size) * align + pan * scaled_src_size; *dst_end = *dst_start + scaled_src_size; // Distance of screen frame to video -- cgit v1.2.3