diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-01 10:52:23 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-01 10:52:23 +0000 |
commit | ad95e7a79ad3f75b2b2ffbbd807ec6b48bd233f6 (patch) | |
tree | e8e0278cbfb359a243c2400ec83c96ded9edec5c /libmpcodecs | |
parent | f3dec715cd7f7714826848e5cd6190e4cd5221ea (diff) | |
download | mpv-ad95e7a79ad3f75b2b2ffbbd807ec6b48bd233f6.tar.bz2 mpv-ad95e7a79ad3f75b2b2ffbbd807ec6b48bd233f6.tar.xz |
Do not modify parsed command-line values on config,
use a local variable instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20577 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_expand.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index 605ee5dc88..922c20cf90 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -184,11 +184,12 @@ 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 + 0.5; + float adjusted_aspect = vf->priv->aspect; + adjusted_aspect *= ((double)width/height) / ((double)d_width/d_height); + if (vf->priv->exp_h < vf->priv->exp_w / adjusted_aspect) { + vf->priv->exp_h = vf->priv->exp_w / adjusted_aspect + 0.5; } else { - vf->priv->exp_w = vf->priv->exp_h * vf->priv->aspect + 0.5; + vf->priv->exp_w = vf->priv->exp_h * adjusted_aspect + 0.5; } } if (vf->priv->round > 1) { // round up. |