diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 15e6a0c55d..a1c7c19f8f 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -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 \ \ diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index 946f84fc19..ab7b71aff0 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -183,10 +183,10 @@ static int config(struct vf_instance_s* vf, else if( vf->priv->exp_hpriv->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.