mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
format_timestamp: return <InvTC> for invalid timestamp_c objects
This commit is contained in:
parent
7c077c4b3d
commit
c3ee7d3d90
@ -31,6 +31,8 @@ template<typename T>
|
||||
std::string
|
||||
format_timestamp(basic_timestamp_c<T> const ×tamp,
|
||||
unsigned int precision = 9) {
|
||||
if (!timestamp.valid())
|
||||
return "<InvTC>";
|
||||
return format_timestamp(timestamp.to_ns(), precision);
|
||||
}
|
||||
|
||||
@ -38,6 +40,8 @@ template<typename T>
|
||||
std::string
|
||||
format_timestamp(basic_timestamp_c<T> const ×tamp,
|
||||
std::string const &format) {
|
||||
if (!timestamp.valid())
|
||||
return "<InvTC>";
|
||||
return format_timestamp(timestamp.to_ns(), format);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user