diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-11-02 00:32:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-11-02 00:32:33 +0000 |
| commit | 3c5c59b5244d8948f05a3251ec14cb20fbcc0d7c (patch) | |
| tree | 42ed0027aa240f492c4428afc8109428f36c962a /src | |
| parent | c9338a9960d363c86020dcb17fef7de40b72c061 (diff) | |
Forward-port time rounding fix from 0.x.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp_time.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dcp_time.cc b/src/dcp_time.cc index e2803a53..9ce36764 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; |
