# HG changeset patch # User pontscho # Date 1020262505 0 # Node ID 20ccb89222bc3d3f70542c2d539de896dd67e678 # Parent 79f5f072348b9e89f4bf0c25326d9833262fc10d expand=-1:-50:0:0 -> mwidth:mheight+50:0:0 diff -r 79f5f072348b -r 20ccb89222bc libmpcodecs/vf_expand.c --- a/libmpcodecs/vf_expand.c Wed May 01 14:12:32 2002 +0000 +++ b/libmpcodecs/vf_expand.c Wed May 01 14:15:05 2002 +0000 @@ -145,8 +145,17 @@ unsigned int flags, unsigned int outfmt){ int ret; // calculate the missing parameters: +#if 0 if(vf->priv->exp_wpriv->exp_w=width; if(vf->priv->exp_hpriv->exp_h=height; +#else + if ( vf->priv->exp_w == -1 ) vf->priv->exp_w=width; + else if (vf->priv->exp_w < -1 ) vf->priv->exp_w=width - vf->priv->exp_w; + else if ( vf->priv->exp_wpriv->exp_w=width; + if ( vf->priv->exp_h == -1 ) vf->priv->exp_h=height; + else if ( vf->priv->exp_h < -1 ) vf->priv->exp_h=height - vf->priv->exp_h; + else if( vf->priv->exp_hpriv->exp_h=height; +#endif if(vf->priv->exp_x<0 || vf->priv->exp_x+width>vf->priv->exp_w) vf->priv->exp_x=(vf->priv->exp_w-width)/2; if(vf->priv->exp_y<0 || vf->priv->exp_y+height>vf->priv->exp_h) vf->priv->exp_y=(vf->priv->exp_h-height)/2; vf->priv->fb_ptr=NULL;