summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2023-11-29 09:05:18 +0100
committerDudemanguy <random342@airmail.cc>2023-11-30 15:08:56 +0000
commit8b4a995a9d7ee7b65a5d2c893d72844d551d9697 (patch)
tree654e66995ac1a095e5c46d45c92ff256a0603eeb
parent7dff735241b2c2f1aa540362f18a2698d3859ed8 (diff)
downloadmpv-8b4a995a9d7ee7b65a5d2c893d72844d551d9697.tar.bz2
mpv-8b4a995a9d7ee7b65a5d2c893d72844d551d9697.tar.xz
playloop: use a 16:9 ratio with --force-window
ca2b05c0fb changed the window size with --force-window and no video tracks to be closer to 16:9, but I don't see why we shouldn't have an actual 16:9 ratio. The advantage is that subtitles with fullscreen and no video tracks will have the same size and position (depending on the values of --sub-scale-with-window and --sub-use-margins) as with 16:9 videos, because there will be no (invisible) black bars.
-rw-r--r--player/playloop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 60596da76d..3a10f6faee 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -1030,8 +1030,12 @@ int handle_force_window(struct MPContext *mpctx, bool force)
break;
}
}
+
+ // Use a 16:9 aspect ratio so that fullscreen on a 16:9 screen will not
+ // have vertical margins, which can lead to a different size or position
+ // of subtitles than with 16:9 videos.
int w = 960;
- int h = 480;
+ int h = 540;
struct mp_image_params p = {
.imgfmt = config_format,
.w = w, .h = h,