From 6d7dc1a2b650a74f23b772d215bb43d5f7b3e173 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 2 Nov 2014 00:28:06 +0000 Subject: Fix tests. Fix rounding of time creation from seconds of frame counts. --- src/dcp_time.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dcp_time.cc') diff --git a/src/dcp_time.cc b/src/dcp_time.cc index 4c16a91a..9b93391b 100644 --- a/src/dcp_time.cc +++ b/src/dcp_time.cc @@ -56,8 +56,8 @@ Time::Time (int64_t ticks) void Time::set (double ss) { - t = (int (round (ss * 1000)) % 1000) / 4; s = floor (ss); + t = int (round (1000 * (ss - s) / 4)); if (s >= 60) { m = s / 60; -- cgit v1.2.3