diff --git a/rem/vidconv/vconv.c b/rem/vidconv/vconv.c index 3b8c7f28f..97840d113 100644 --- a/rem/vidconv/vconv.c +++ b/rem/vidconv/vconv.c @@ -830,13 +830,13 @@ void vidconv_center(struct vidframe *dst, const struct vidframe *src, double rh = (double)src->size.h / (double)r->h; sc.size.w = (unsigned)min((double)src->size.w, (double)r->w * rh); - sc.xoffs = ((src->size.w / rh) - r->w) / 2; + sc.xoffs = ((unsigned)(src->size.w / rh) - r->w) / 2; } else { double rw = (double)src->size.w / (double)r->w; sc.size.h = (unsigned)min((double)src->size.h, (double)r->h * rw); - sc.yoffs = ((src->size.h / rw) - r->h) / 2; + sc.yoffs = ((unsigned)(src->size.h / rw) - r->h) / 2; } vidconv(dst, &sc, r);