Skip to content

Commit

Permalink
playloop: use a 16:9 ratio with --force-window
Browse files Browse the repository at this point in the history
ca2b05c 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.
  • Loading branch information
guidocella authored and Dudemanguy committed Nov 30, 2023
1 parent 7dff735 commit 8b4a995
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion player/playloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8b4a995

Please sign in to comment.