summaryrefslogtreecommitdiff
path: root/src/wx/timecode.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-03 12:38:30 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-03 12:38:30 +0000
commita2e3a20a441e604550f0036ca198d5d2122e16a7 (patch)
treec0da2b4ace57020b9973f20108e8bbf11ed4e444 /src/wx/timecode.cc
parentc93389b617d2b1a4f5b36025e3097a9f03a7c9cf (diff)
Fix rounding of timecodes in at least some cases (#323).
Reported-by: Gérald Maruccia
Diffstat (limited to 'src/wx/timecode.cc')
-rw-r--r--src/wx/timecode.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wx/timecode.cc b/src/wx/timecode.cc
index 033bd2bd0..ef0ced428 100644
--- a/src/wx/timecode.cc
+++ b/src/wx/timecode.cc
@@ -91,7 +91,7 @@ Timecode::set (Time t, int fps)
t -= m * 60 * TIME_HZ;
int const s = t / TIME_HZ;
t -= s * TIME_HZ;
- int const f = t * fps / TIME_HZ;
+ int const f = divide_with_round (t * fps, TIME_HZ);
checked_set (_hours, lexical_cast<string> (h));
checked_set (_minutes, lexical_cast<string> (m));