Update for libdcp API changes.
[dcpomatic.git] / src / lib / ffmpeg_subtitle_stream.h
index 064c72f8d6166b1beef064cf16d39bd21fb82e8e..5d5048b1097ea77c431c4b8f1ca97215b7d5bf8f 100644 (file)
@@ -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;
 };