From 1fb2b704098a593d152a833f979d8e0a157d5057 Mon Sep 17 00:00:00 2001 From: ods15 Date: Mon, 5 Dec 2005 17:52:00 +0000 Subject: expand aspect works by display aspect, not video aspect. try 2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17103 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_expand.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index dd2ffa47f0..4ca020de57 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -183,10 +183,11 @@ static int config(struct vf_instance_s* vf, else if( vf->priv->exp_hpriv->exp_h=height; #endif if (vf->priv->aspect) { + vf->priv->aspect *= ((double)width/height) / ((double)d_width/d_height); if (vf->priv->exp_h < vf->priv->exp_w / vf->priv->aspect) { - vf->priv->exp_h = vf->priv->exp_w / vf->priv->aspect; + vf->priv->exp_h = vf->priv->exp_w / vf->priv->aspect + 0.5; } else { - vf->priv->exp_w = vf->priv->exp_h * vf->priv->aspect; + vf->priv->exp_w = vf->priv->exp_h * vf->priv->aspect + 0.5; } } if (vf->priv->round > 1) { // round up. -- cgit v1.2.3