1
mirror of https://github.com/mpv-player/mpv synced 2024-10-18 10:25:02 +02:00

10l to whoever got aspect upside-down.. it's w/h, not h/w. hope this doesn't bother anyone already using it too much

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16838 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rfelker 2005-10-23 15:25:10 +00:00
parent db1aa87238
commit 37584f552e
2 changed files with 5 additions and 5 deletions

View File

@ -4431,9 +4431,9 @@ Expands to fit an aspect instead of a resolution (default: 0).
.I EXAMPLE:
.PD 0
.RSs
.IP expand=800::::3/4
.IP expand=800::::4/3
Expands to 800x600, unless the source is higher resolution, in which
case it expands to fill a 3/4 aspect.
case it expands to fill a 4/3 aspect.
.RE
.PD 1
.IPs <r>\ \

View File

@ -183,10 +183,10 @@ static int config(struct vf_instance_s* vf,
else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
#endif
if (vf->priv->aspect) {
if (vf->priv->exp_h < vf->priv->exp_w * vf->priv->aspect) {
vf->priv->exp_h = vf->priv->exp_w * vf->priv->aspect;
if (vf->priv->exp_h < vf->priv->exp_w / vf->priv->aspect) {
vf->priv->exp_h = vf->priv->exp_w / vf->priv->aspect;
} else {
vf->priv->exp_w = vf->priv->exp_h / vf->priv->aspect;
vf->priv->exp_w = vf->priv->exp_h * vf->priv->aspect;
}
}
if (vf->priv->round > 1) { // round up.