projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix seek with respect to video/audio frame boundary alignment.
[dcpomatic.git]
/
src
/
lib
/
util.cc
diff --git
a/src/lib/util.cc
b/src/lib/util.cc
index d5a07192c9f2694842b37161a88a878e71e216c8..381c47a9ae606253a7207a492351965987638c58 100644
(file)
--- a/
src/lib/util.cc
+++ b/
src/lib/util.cc
@@
-915,3
+915,10
@@
fit_ratio_within (float ratio, libdcp::Size full_frame)
return libdcp::Size (full_frame.width, rint (full_frame.width / ratio));
}
+
+DCPTime
+time_round_up (DCPTime t, DCPTime nearest)
+{
+ DCPTime const a = t + nearest - 1;
+ return a - (a % nearest);
+}