diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-12-09 16:30:31 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-12-09 16:30:31 +0000 |
| commit | 91f71a29f894c382a7f92cf5fdcb75d9849e2aa7 (patch) | |
| tree | 8b8fcc0f64287367d6555b54f212150f25ddff26 /src/lib | |
| parent | 5527d5e1dd40f759e5e4a33561fe89313d23fa20 (diff) | |
Various fixes pointed out by tests.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/content.cc | 4 | ||||
| -rw-r--r-- | src/lib/image_examiner.cc | 2 | ||||
| -rw-r--r-- | src/lib/video_content.cc | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index cc29345a2..ba83e2627 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -139,7 +139,9 @@ Content::examine (shared_ptr<Job> job, bool calculate_digest) return; } - job->sub (_("Computing digest")); + if (job) { + job->sub (_("Computing digest")); + } boost::mutex::scoped_lock lm (_mutex); vector<boost::filesystem::path> p = _paths; diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index d6c7d0502..e8db326c7 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -65,7 +65,7 @@ ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const Imag _video_length = ContentTime::from_seconds (Config::instance()->default_still_length()); } else { _video_length = ContentTime::from_frames ( - _image_content->number_of_paths (), video_frame_rate().get_value_or (0) + _image_content->number_of_paths (), video_frame_rate().get_value_or (24) ); } } diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 1fe02bae4..1da5d87c1 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -228,9 +228,8 @@ VideoContent::take_from_video_examiner (shared_ptr<VideoExaminer> d) { boost::mutex::scoped_lock lm (_mutex); _video_size = vs; - if (vfr) { - _video_frame_rate = vfr.get (); - } + /* Default video frame rate to 24fps if the examiner doesn't know */ + _video_frame_rate = vfr.get_value_or (24); _video_length = vl; _sample_aspect_ratio = ar; |
