X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Ffilm.cc;fp=src%2Flib%2Ffilm.cc;h=361031fc87d9e6b8309506bb78b8d95216336bd9;hb=47f25009bcbc765e397bcb471dd361a511c99daf;hp=c8aee7a0aa6bdf6bc6b925209a6ae92043f72098;hpb=afc495f722f89fea0bcc579046d1a5d362e36f69;p=dcpomatic.git diff --git a/src/lib/film.cc b/src/lib/film.cc index c8aee7a0a..361031fc8 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -145,6 +145,8 @@ Film::Film (string d, bool must_exist) if (must_exist) { read_metadata (); + } else { + write_metadata (); } _log.reset (new FileLog (file ("log"))); @@ -193,6 +195,7 @@ string Film::video_state_identifier () const { assert (format ()); + LocaleGuard lg; pair f = Filter::ffmpeg_strings (filters()); @@ -405,6 +408,7 @@ Film::write_metadata () const ContentList the_content = content (); boost::mutex::scoped_lock lm (_state_mutex); + LocaleGuard lg; boost::filesystem::create_directories (directory()); @@ -471,6 +475,7 @@ void Film::read_metadata () { boost::mutex::scoped_lock lm (_state_mutex); + LocaleGuard lg; if (boost::filesystem::exists (file ("metadata")) && !boost::filesystem::exists (file ("metadata.xml"))) { throw StringError (_("This film was created with an older version of DCP-o-matic, and unfortunately it cannot be loaded into this version. You will need to create a new Film, re-add your content and set it up again. Sorry!"));