Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
[dcpomatic.git] / src / lib / image_examiner.cc
index 79c9f727ceed7ba710546cb8d4292eb0f58a4df5..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>
@@ -80,9 +81,14 @@ ImageExaminer::video_size () const
        return _video_size.get ();
 }
 
-optional<float>
+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<float> ();
+       return optional<double> ();
 }