mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
f3dec715cd
commit
ad95e7a79a
|
@ -184,11 +184,12 @@ static int config(struct vf_instance_s* vf,
|
||||||
else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
|
else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
|
||||||
#endif
|
#endif
|
||||||
if (vf->priv->aspect) {
|
if (vf->priv->aspect) {
|
||||||
vf->priv->aspect *= ((double)width/height) / ((double)d_width/d_height);
|
float adjusted_aspect = vf->priv->aspect;
|
||||||
if (vf->priv->exp_h < vf->priv->exp_w / vf->priv->aspect) {
|
adjusted_aspect *= ((double)width/height) / ((double)d_width/d_height);
|
||||||
vf->priv->exp_h = vf->priv->exp_w / vf->priv->aspect + 0.5;
|
if (vf->priv->exp_h < vf->priv->exp_w / adjusted_aspect) {
|
||||||
|
vf->priv->exp_h = vf->priv->exp_w / adjusted_aspect + 0.5;
|
||||||
} else {
|
} 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.
|
if (vf->priv->round > 1) { // round up.
|
||||||
|
|
Loading…
Reference in New Issue