diff --git a/gst/gstutils.c b/gst/gstutils.c
index 0f49340..22040b0 100644
--- a/gst/gstutils.c
+++ b/gst/gstutils.c
@@ -304,6 +304,13 @@ gst_util_uint64_scale_int64_unchecked (guint64 val, guint64 num, guint64 denom)
   c0.l.high = ct.l.low;
   c1.ll = (guint64) a1.l.high + b0.l.high + ct.l.high + b1.ll;
 
+  /* add 1/2 the denominator so the result is rounded */
+  a0.ll = denom / 2;
+  if (G_MAXUINT64 - c0.ll < a0.ll)
+    /* sum will roll over, carry into high 64 bits */
+    c1.ll++;
+  c0.ll += a0.ll;
+
   /* if high bits bigger than denom, we overflow */
   if (G_UNLIKELY (c1.ll >= denom))
     goto overflow;
@@ -346,6 +353,11 @@ gst_util_uint64_scale_int_unchecked (guint64 val, gint num, gint denom)
   result.ll = ((guint64) low.l.low) * num;
   high.ll = ((guint64) low.l.high) * num + (result.l.high);
 
+  /* add 1/2 the denominator so the result is rounded */
+  result.l.high = 0;
+  result.ll += denom / 2;	/* can't overflow */
+  high.ll += result.l.high;	/* carry */
+
   low.ll = high.ll / denom;
   result.l.high = high.ll % denom;
   result.ll /= denom;
@@ -439,8 +451,8 @@ gst_util_uint64_scale_int (guint64 val, gint num, gint denom)
     return val;
 
   if (val <= G_MAXUINT32)
-    /* simple case */
-    return val * num / denom;
+    /* simple case;  add 1/2 denominator so result is rounded */
+    return (val * num + denom / 2) / denom;
 
   return gst_util_uint64_scale_int_unchecked (val, num, denom);
 }
