2013-12-18 Carl Hetherington <cth@carlh.net>
+ * Fix progress reporting when making 3D DCPs.
+
* Fix non-update of display when changing video frame type (2D,
3D left/right etc.)
if (_film->length()) {
shared_ptr<Job> job = _job.lock ();
assert (job);
- job->set_progress (
- float (_full_written + _fake_written + _repeat_written) / _film->time_to_video_frames (_film->length())
- );
+ int total = _film->time_to_video_frames (_film->length ());
+ if (_film->three_d ()) {
+ /* _full_written and so on are incremented for each eye, so we need to double the total
+ frames to get the correct progress.
+ */
+ total *= 2;
+ }
+ job->set_progress (float (_full_written + _fake_written + _repeat_written) / total);
}
}