summaryrefslogtreecommitdiff
path: root/libs/timecode/src/time.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/timecode/src/time.cc')
-rw-r--r--libs/timecode/src/time.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/timecode/src/time.cc b/libs/timecode/src/time.cc
index b993c3eba0..5a4da10691 100644
--- a/libs/timecode/src/time.cc
+++ b/libs/timecode/src/time.cc
@@ -578,13 +578,15 @@ timecode_format_name (TimecodeFormat const t)
return "??";
}
-std::string timecode_format_time (Timecode::Time& TC)
+std::string timecode_format_time (Timecode::Time TC)
{
char buf[32];
if (TC.negative) {
- snprintf (buf, sizeof (buf), "-%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, TC.hours, TC.minutes, TC.seconds, TC.frames);
+ snprintf (buf, sizeof (buf), "-%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 "%c%02" PRIu32,
+ TC.hours, TC.minutes, TC.seconds, TC.drop ? ';' : ':', TC.frames);
} else {
- snprintf (buf, sizeof (buf), " %02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, TC.hours, TC.minutes, TC.seconds, TC.frames);
+ snprintf (buf, sizeof (buf), " %02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 "%c%02" PRIu32,
+ TC.hours, TC.minutes, TC.seconds, TC.drop ? ';' : ':', TC.frames);
}
return std::string(buf);
}