mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 17:39:38 +00:00
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:
parent
e2cf3837fe
commit
4cb6458382
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user