summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-12-18 16:21:16 +0000
committerCarl Hetherington <cth@carlh.net>2013-12-18 16:21:16 +0000
commitf25d0085d164df1a70b5c6eb2aa699900ef5440f (patch)
treed485f0e7b646bcc0d8723ffabb8135b226b01e3d /src
parent68856c377d520c2e57f08dba3b19f6cec4858793 (diff)
Fix progress reporting for 3D DCPs.
Diffstat (limited to 'src')
-rw-r--r--src/lib/writer.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 4c9749d89..109447f73 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -274,9 +274,14 @@ try
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);
}
}