changeset 18390:f9b0c8fe997e

fix float rounding error
author ods15
date Fri, 05 May 2006 18:52:14 +0000
parents fdface43ee10
children b5c6755ffa29
files libmpcodecs/vf_dsize.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_dsize.c	Fri May 05 17:30:52 2006 +0000
+++ b/libmpcodecs/vf_dsize.c	Fri May 05 18:52:14 2006 +0000
@@ -46,10 +46,10 @@
 		d_height = vf->priv->h;
 	} else {
 		if (vf->priv->aspect * height > width) {
-			d_width = height * vf->priv->aspect;
+			d_width = height * vf->priv->aspect + .5;
 			d_height = height;
 		} else {
-			d_height = width / vf->priv->aspect;
+			d_height = width / vf->priv->aspect + .5;
 			d_width = width;
 		}
 	}