diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-08-27 12:38:22 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-08-27 12:38:22 +0000 |
commit | e18b64611cca4d972d25f2128a74eef8d9e86330 (patch) | |
tree | 75d4c1bf99daeb97e4b4e90866019201b4997970 /libvo | |
parent | 4cbff98bade70f952748e9c3f3281e79fd61f291 (diff) |
Fix aspect_fit to work correctly when borders need to be added on top and
bottom, previous code accidentally compared against screen dimensions,
resulting in cropping instead of added borders.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29558 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/aspect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libvo/aspect.c b/libvo/aspect.c index df61d2938b..068690821c 100644 --- a/libvo/aspect.c +++ b/libvo/aspect.c @@ -99,11 +99,11 @@ void aspect_fit(int *srcw, int *srch, int fitw, int fith){ #ifdef ASPECT_DEBUG printf("aspect(2) wh: %dx%d (org: %dx%d)\n",*srcw,*srch,aspdat.prew,aspdat.preh); #endif - if(*srch>aspdat.scrh || *srch<aspdat.orgh){ + if(*srch>fith || *srch<aspdat.orgh){ tmpw = (int)(((float)fith / (float)aspdat.preh * (float)aspdat.prew) * ((float)aspdat.scrw / ((float)aspdat.scrh / (1.0/monitor_aspect)))); tmpw+= tmpw%2; // round - if(tmpw<=aspdat.scrw /*&& tmpw>=aspdat.orgw*/){ + if(tmpw<=fitw /*&& tmpw>=aspdat.orgw*/){ *srch = fith; *srcw = tmpw; }else{ |