projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
78db20a
)
Fix uninitialised variable.
author
Carl Hetherington
<cth@carlh.net>
Sun, 11 Jan 2015 16:41:15 +0000
(16:41 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 11 Jan 2015 16:41:15 +0000
(16:41 +0000)
src/dcp_time.cc
patch
|
blob
|
history
diff --git
a/src/dcp_time.cc
b/src/dcp_time.cc
index 93c12a064d778182ef88dfa50ffa833ca066f7d5..c3c60f662e59890bdba810f0210659f1fa837622 100644
(file)
--- a/
src/dcp_time.cc
+++ b/
src/dcp_time.cc
@@
-34,13
+34,8
@@
using namespace boost;
using namespace dcp;
Time::Time (int frame, int frames_per_second, int tcr_)
using namespace dcp;
Time::Time (int frame, int frames_per_second, int tcr_)
- : h (0)
- , m (0)
- , s (0)
- , e (0)
- , tcr (tcr_)
{
{
- set (double (frame) / frames_per_second, tcr);
+ set (double (frame) / frames_per_second, tcr
_
);
}
Time::Time (double seconds)
}
Time::Time (double seconds)
@@
-59,11
+54,15
@@
Time::set (double seconds, int tcr_)
if (s >= 60) {
m = s / 60;
s -= m * 60;
if (s >= 60) {
m = s / 60;
s -= m * 60;
+ } else {
+ m = 0;
}
if (m >= 60) {
h = m / 60;
m -= h * 60;
}
if (m >= 60) {
h = m / 60;
m -= h * 60;
+ } else {
+ h = 0;
}
}
}
}