summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-11-02 00:28:06 +0000
committerCarl Hetherington <cth@carlh.net>2014-11-02 00:28:06 +0000
commit6d7dc1a2b650a74f23b772d215bb43d5f7b3e173 (patch)
tree1fa8e129e9c2728888829e6cff79b5aac6edd726 /src
parent7ed77ae6d938d5ce9b436736fec1029e2f9984d1 (diff)
Fix tests. Fix rounding of time creation from seconds of frame counts.
Diffstat (limited to 'src')
-rw-r--r--src/dcp_time.cc2
1 files changed, 1 insertions, 1 deletions
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;