diff options
author | 2002-05-06 22:50:02 +0000 | |
---|---|---|
committer | 2002-05-06 22:50:02 +0000 | |
commit | 24a34ce6137106e9114b5477ff91a530c612a003 (patch) | |
tree | fcdeef7949d5f9ffde380ba44dad074d6648fee8 /libmpcodecs | |
parent | 9178c5871a5d53dc067178256722521a907368b2 (diff) |
w/h=0 means d_w/h instead of original
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6004 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_scale.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index f474f4cd3f..59fc956311 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -82,8 +82,10 @@ static int config(struct vf_instance_s* vf, } // calculate the missing parameters: - if(vf->priv->w<=0) vf->priv->w=width; - if(vf->priv->h<=0) vf->priv->h=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<0) vf->priv->h=height; else + if(vf->priv->h==0) vf->priv->h=d_height; printf("SwScale scaling %dx%d %s to %dx%d %s \n", width,height,vo_format_name(outfmt), @@ -103,6 +105,7 @@ static int config(struct vf_instance_s* vf, return 0; } vf->priv->fmt=best; + return vf_next_config(vf,vf->priv->w,vf->priv->h,d_width,d_height,flags,best); } @@ -169,7 +172,7 @@ static int open(vf_instance_t *vf, char* args){ if(args) sscanf(args, "%d:%d", &vf->priv->w, &vf->priv->h); - printf("SwScale: %d x %d\n", + printf("SwScale: %d x %d (-1=no scaling)\n", vf->priv->w, vf->priv->h); return 1; |