From f25d0085d164df1a70b5c6eb2aa699900ef5440f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 18 Dec 2013 16:21:16 +0000 Subject: Fix progress reporting for 3D DCPs. --- src/lib/writer.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/lib') 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.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); } } -- cgit v1.2.3