diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-18 12:09:35 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-18 12:09:35 +0000 |
| commit | 060a980527bc0b39e12494fec3c0baaab4c9d086 (patch) | |
| tree | 82de7bbcf605543be583b2ed3daf22d8145f6657 /src/lib/util.cc | |
| parent | e0c59417c6a52dbd853114fbc0f88c6d8c1dd276 (diff) | |
Fix seek with respect to video/audio frame boundary alignment.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index d5a07192c..381c47a9a 100644 --- 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); +} |
