summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-20 23:15:11 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-20 23:15:11 +0200
commit4aff125b35984e7777d06edccdceeb28e531b907 (patch)
tree9d5f131f82d2cc5d622a3d59248dadb7c24516e8
parente5bcd70bc5b0557635ae51c7093f0e887493d4ba (diff)
downloadmpv-4aff125b35984e7777d06edccdceeb28e531b907.tar.bz2
mpv-4aff125b35984e7777d06edccdceeb28e531b907.tar.xz
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.
-rw-r--r--DOCS/man/en/mplayer.18
-rw-r--r--libvo/video_out.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 1a851be78b..083e7363fb 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -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\ "
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 7211d69e65..9331e80faf 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -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 */