From 1387f5550fd7b5f1d20062afb201cda903090814 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Thu, 16 Jun 2016 08:28:33 -0700 Subject: [PATCH] Fix ubsan warning: vp9_cx_iface.c BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1219 Change-Id: I77584af8b9e25db484d9ced6013da3163a9592c0 --- vp9/vp9_cx_iface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 32c8522..73a089b 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -978,7 +978,7 @@ static int64_t timebase_units_to_ticks(const vpx_rational_t *timebase, static int64_t ticks_to_timebase_units(const vpx_rational_t *timebase, int64_t n) { - const int64_t round = TICKS_PER_SEC * timebase->num / 2 - 1; + const int64_t round = (int64_t)TICKS_PER_SEC * timebase->num / 2 - 1; return (n * timebase->den + round) / timebase->num / TICKS_PER_SEC; } -- 2.7.4