summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/export_filename.h
diff options
context:
space:
mode:
authorJulien ROGER <gulien.roger@gmail.com>2016-02-11 03:46:51 +0100
committerTim Mayberry <mojofunk@gmail.com>2016-02-13 12:45:40 +1000
commita3dd27c41bff52a0c5216b768f98e3b8adf77108 (patch)
tree73995b8e66a5e8dba304b65882b247ecc09c5fd5 /libs/ardour/ardour/export_filename.h
parent1fbe4253aafc8821f5d9db0d7e99fcb1712c4cc5 (diff)
Fix 6677: Post-export script reinterprets timestamp format placeholder giving incorrect filename
Due to localtime and its statically allocated buffer, time_struct variable is set at construct time but its value changes over time due to subsequent calls to localtime in ardour process. Replacing localtime by localtime_r fix the problem. This also fix 6713: Name of Audio (timestamp) does not match with written Filename in CD-Cue file
Diffstat (limited to 'libs/ardour/ardour/export_filename.h')
-rw-r--r--libs/ardour/ardour/export_filename.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/ardour/ardour/export_filename.h b/libs/ardour/ardour/export_filename.h
index 7eacc11b90..3761f97cb6 100644
--- a/libs/ardour/ardour/export_filename.h
+++ b/libs/ardour/ardour/export_filename.h
@@ -112,8 +112,7 @@ class LIBARDOUR_API ExportFilename {
TimeFormat time_format;
std::string get_formatted_time (std::string const & format) const;
- // Due to the static allocation used in strftime(), no destructor or copy-ctor is needed for this
- struct tm * time_struct;
+ struct tm time_struct;
ExportTimespanPtr timespan;
ExportChannelConfigPtr channel_config;