Use uchardet to guess encoding of subtitle files and reject non-UTF-8.
[dcpomatic.git] / src / lib / image_examiner.cc
index 6ad32f511e1971ddd8d24123e4bdf0ba2bcfe696..7a93b5cd1439a9bfa0757d6946e965ffa32c5788 100644 (file)
@@ -24,6 +24,7 @@
 #include "exceptions.h"
 #include "config.h"
 #include "cross.h"
+#include "compose.hpp"
 #include <dcp/openjpeg_image.h>
 #include <dcp/exceptions.h>
 #include <Magick++.h>
@@ -83,6 +84,11 @@ ImageExaminer::video_size () const
 optional<double>
 ImageExaminer::video_frame_rate () const
 {
+       if (_image_content->video_frame_rate() != 0) {
+               /* The content already knows what frame rate it should be */
+               return _image_content->video_frame_rate();
+       }
+
        /* Don't know */
        return optional<double> ();
 }