Use dcp::file_to_string().
[dcpomatic.git] / src / lib / ffmpeg_subtitle_stream.h
index 064c72f8d6166b1beef064cf16d39bd21fb82e8e..8f56d1975e5e7eb5defa7b529af64af4909fef06 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2017 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -21,6 +21,7 @@
 #include "dcpomatic_time.h"
 #include "rgba.h"
 #include "ffmpeg_stream.h"
+#include <boost/thread/mutex.hpp>
 #include <map>
 
 class FFmpegSubtitleStream : public FFmpegStream
@@ -38,5 +39,7 @@ public:
        std::map<RGBA, RGBA> colours () const;
 
 private:
+       /** mutex to protect _colours as it can be set from the "examine FFmpeg subtitles" job thread */
+       mutable boost::mutex _mutex;
        std::map<RGBA, RGBA> _colours;
 };