summaryrefslogtreecommitdiffstats
path: root/video/out/aspect.c
diff options
context:
space:
mode:
authorllyyr <llyyr.public@gmail.com>2023-09-01 00:46:03 +0530
committerDudemanguy <random342@airmail.cc>2023-09-02 16:18:31 +0000
commitf52056b76da180bd3a04365e7da178f15cdb44a7 (patch)
tree3a17cac0d6b7cf3cfbc5c1add349aa758f619223 /video/out/aspect.c
parent022dbfc977c3d88cf693ce184c2f86073ae12428 (diff)
downloadmpv-f52056b76da180bd3a04365e7da178f15cdb44a7.tar.bz2
mpv-f52056b76da180bd3a04365e7da178f15cdb44a7.tar.xz
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.
Diffstat (limited to 'video/out/aspect.c')
-rw-r--r--video/out/aspect.c2
1 files changed, 1 insertions, 1 deletions
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