summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/vf_dsize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpcodecs/vf_dsize.c b/libmpcodecs/vf_dsize.c
index 3d890ed93f..a82d24eed5 100644
--- a/libmpcodecs/vf_dsize.c
+++ b/libmpcodecs/vf_dsize.c
@@ -46,10 +46,10 @@ static int config(struct vf_instance_s* vf,
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;
}
}