Add language property to SubtitleContent and use it in output DCP subtitle files.
[dcpomatic.git] / src / lib / dcp_subtitle_content.cc
index 83b0d200cee33146c6f92b33a1de1bd0b34df0da..798afbfc39dfc87aca74d50142b9076bd98b9770 100644 (file)
@@ -17,9 +17,9 @@
 
 */
 
+#include "dcp_subtitle_content.h"
 #include <dcp/subtitle_content.h>
 #include <dcp/raw_convert.h>
-#include "dcp_subtitle_content.h"
 
 #include "i18n.h"
 
@@ -44,10 +44,11 @@ DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, cxml::Const
 }
 
 void
-DCPSubtitleContent::examine (shared_ptr<Job> job)
+DCPSubtitleContent::examine (shared_ptr<Job> job, bool calculate_digest)
 {
-       Content::examine (job);
+       Content::examine (job, calculate_digest);
        dcp::SubtitleContent sc (path (0), false);
+       _subtitle_language = sc.language ();
        _length = DCPTime::from_seconds (sc.latest_subtitle_out().to_seconds ());
 }