diff options
Diffstat (limited to 'libmpcodecs/vf_expand.c')
-rw-r--r-- | libmpcodecs/vf_expand.c | 6 |
1 files changed, 3 insertions, 3 deletions
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_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. |