diff options
author | ods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-12-05 17:52:00 +0000 |
---|---|---|
committer | ods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-12-05 17:52:00 +0000 |
commit | 1fb2b704098a593d152a833f979d8e0a157d5057 (patch) | |
tree | 1c2b7d93fabe1ccbfeb3b4d7fa7ff14f58676f29 /libmpcodecs/vf_expand.c | |
parent | c342ad43cd47ca1ebaadbe8ce5b2cd8a74d41563 (diff) | |
download | mpv-1fb2b704098a593d152a833f979d8e0a157d5057.tar.bz2 mpv-1fb2b704098a593d152a833f979d8e0a157d5057.tar.xz |
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
Diffstat (limited to 'libmpcodecs/vf_expand.c')
-rw-r--r-- | libmpcodecs/vf_expand.c | 5 |
1 files 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_h<height ) vf->priv->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. |