1
mirror of https://github.com/mpv-player/mpv synced 2025-01-05 03:06:28 +01:00

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
This commit is contained in:
ods15 2005-12-05 17:52:00 +00:00
parent c342ad43cd
commit 1fb2b70409

View File

@ -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.