summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/vf_scale.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index bc83b0b1f6..5a197fd1be 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -144,12 +144,12 @@ static int config(struct vf_instance_s* vf,
}
}
- if (vf->priv->w < 0 && (-vf->priv->w & 8)) {
- vf->priv->w = -(-vf->priv->w & ~8);
+ if (vf->priv->w <= -8) {
+ vf->priv->w += 8;
round_w = 1;
}
- if (vf->priv->h < 0 && (-vf->priv->h & 8)) {
- vf->priv->h = -(-vf->priv->h & ~8);
+ if (vf->priv->h <= -8) {
+ vf->priv->h += 8;
round_h = 1;
}