X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_examiner.cc;h=376491738ef7b004fb2dd5d8dd37ef0c5bf9a96b;hb=5b3e3df6c9352e31dd932a5af215eabbf2cf27c8;hp=79c9f727ceed7ba710546cb8d4292eb0f58a4df5;hpb=e60bb3e51bd1508b149e6b8f6608f09b5196ae26;p=dcpomatic.git diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 79c9f727c..376491738 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -24,6 +24,7 @@ #include "exceptions.h" #include "config.h" #include "cross.h" +#include "compose.hpp" #include #include #include @@ -68,7 +69,7 @@ ImageExaminer::ImageExaminer (shared_ptr film, shared_ptrstill ()) { - _video_length = Config::instance()->default_still_length() * video_frame_rate().get_value_or (24); + _video_length = Config::instance()->default_still_length() * video_frame_rate().get_value_or (film->video_frame_rate ()); } else { _video_length = _image_content->number_of_paths (); } @@ -80,9 +81,14 @@ ImageExaminer::video_size () const return _video_size.get (); } -optional +optional ImageExaminer::video_frame_rate () const { + if (_image_content->has_own_video_frame_rate()) { + /* The content already knows what frame rate it should be */ + return _image_content->video_frame_rate(); + } + /* Don't know */ - return optional (); + return optional (); }