new special w/h values: -2 and -3. based on proposal by Bohdan Horst <nexus@hoth.amu.edu.pl>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6127 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-05-19 23:39:42 +00:00
parent e2cf3837fe
commit 4cb6458382
1 changed files with 5 additions and 0 deletions

View File

@ -85,8 +85,13 @@ static int config(struct vf_instance_s* vf,
}
// calculate the missing parameters:
if(vf->priv->w==-3) vf->priv->w=vf->priv->h*width/height; else
if(vf->priv->w==-2) vf->priv->w=vf->priv->h*d_width/d_height;
if(vf->priv->w<0) vf->priv->w=width; else
if(vf->priv->w==0) vf->priv->w=d_width;
if(vf->priv->h==-3) vf->priv->h=vf->priv->w*height/width; else
if(vf->priv->h==-2) vf->priv->h=vf->priv->w*d_height/d_width;
if(vf->priv->h<0) vf->priv->h=height; else
if(vf->priv->h==0) vf->priv->h=d_height;