Fix problems with FFmpeg files that have all-zero stream IDs.
[dcpomatic.git] / src / lib / log.cc
index d50769dfe40b6f6508da7ebf94983974511ccc3c..9ddf460d43ccc1c382270e607a7634a66be09049 100644 (file)
  *  @brief A very simple logging class.
  */
 
-#include <fstream>
 #include <time.h>
+#include <cstdio>
 #include "log.h"
+#include "cross.h"
 
 #include "i18n.h"
 
@@ -102,7 +103,8 @@ FileLog::FileLog (boost::filesystem::path file)
 void
 FileLog::do_log (string m)
 {
-       ofstream f (_file.c_str(), fstream::app);
-       f << m << N_("\n");
+       FILE* f = fopen_boost (_file, "a");
+       fprintf (f, "%s\n", m.c_str ());
+       fclose (f);
 }