mirror of https://github.com/mpv-player/mpv
VO: Keep aspect by adding black bars in window mode too if necessary
By default (without -nokeepaspect) MPlayer tries to maintain video aspect ratio by using window manager hints to keep output window aspect when resizing. Before this commit it would however scale the video to completely fill the window even if the window manager did not respect those hints. Change the behavior to add black bars like in fullscreen mode instead in this case.
This commit is contained in:
parent
e5bcd70bc5
commit
4aff125b35
|
@ -3172,8 +3172,12 @@ Useful for multihead setups.
|
|||
.TP
|
||||
.B \-nokeepaspect
|
||||
Do not keep window aspect ratio when resizing windows.
|
||||
Only works with the x11, xv, xmga, xvidix, directx video output drivers.
|
||||
Furthermore under X11 your window manager has to honor window aspect hints.
|
||||
By default MPlayer tries to keep the correct video aspect ratio by
|
||||
instructing the window manager to maintain window aspect when resizing,
|
||||
and by adding black bars if the window manager nevertheless allows
|
||||
window shape to change.
|
||||
This option disables window manager aspect hints and scales the video
|
||||
to completely fill the window without regard for aspect ratio.
|
||||
.
|
||||
.TP
|
||||
.B "\-ontop\ "
|
||||
|
|
|
@ -347,7 +347,7 @@ void calc_src_dst_rects(struct vo *vo, int src_width, int src_height,
|
|||
|
||||
static inline int aspect_scaling(void)
|
||||
{
|
||||
return vo_fs;
|
||||
return vo_keepaspect || vo_fs;
|
||||
}
|
||||
|
||||
#endif /* MPLAYER_VIDEO_OUT_H */
|
||||
|
|
Loading…
Reference in New Issue