summaryrefslogtreecommitdiff
path: root/src/lib/dcpomatic_time.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-01-31 21:36:36 +0000
committerCarl Hetherington <cth@carlh.net>2018-01-31 21:36:36 +0000
commit8bccd0af23b8e1ada43182c2531c21f06036ca37 (patch)
treee8a71402c4804e673fa1e1c97bf7beeba40db37f /src/lib/dcpomatic_time.h
parent2d04092a7938c078ade1a1f54a485b96a23d510c (diff)
Fix missing subtitles when they start just after the start of a frame.
Diffstat (limited to 'src/lib/dcpomatic_time.h')
-rw-r--r--src/lib/dcpomatic_time.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h
index 204af3c1e..3d792467b 100644
--- a/src/lib/dcpomatic_time.h
+++ b/src/lib/dcpomatic_time.h
@@ -125,6 +125,10 @@ public:
return Time<S, O> (llrint (HZ * frames_floor(r) / r));
}
+ Time<S, O> round (double r) const {
+ return Time<S, O> (llrint (HZ * frames_round(r) / r));
+ }
+
double seconds () const {
return double (_t) / HZ;
}