summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/mp_image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/mp_image.c b/video/mp_image.c
index 33badba3f7..ff81dd7666 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -487,9 +487,9 @@ void mp_image_params_get_dsize(const struct mp_image_params *p,
*d_w = p->w;
*d_h = p->h;
if (p->p_w > p->p_h && p->p_h >= 1)
- *d_w = MPCLAMP(*d_w * (int64_t)p->p_w / p->p_h, 0, INT_MAX);
+ *d_w = MPCLAMP(*d_w * (int64_t)p->p_w / p->p_h, 1, INT_MAX);
if (p->p_h > p->p_w && p->p_w >= 1)
- *d_h = MPCLAMP(*d_h * (int64_t)p->p_h / p->p_w, 0, INT_MAX);
+ *d_h = MPCLAMP(*d_h * (int64_t)p->p_h / p->p_w, 1, INT_MAX);
}
void mp_image_params_set_dsize(struct mp_image_params *p, int d_w, int d_h)