diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
| commit | 08d62727f7f1c813cbc7041027fe4a52518623da (patch) | |
| tree | 756e38e4ad5ee2bdb51690e8a6fb149909c53712 /src/lib/writer.cc | |
| parent | 09806bc8d6a48fc79d923ec1cdf6f90176bf8b6a (diff) | |
operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
Diffstat (limited to 'src/lib/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 6c6331486..33b7dd51e 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -292,16 +292,16 @@ try _last_written_frame = qi.frame; _last_written_eyes = qi.eyes; - if (_film->length()) { - shared_ptr<Job> job = _job.lock (); - assert (job); - int64_t total = _film->length().frames (_film->video_frame_rate ()); - 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; - } + shared_ptr<Job> job = _job.lock (); + assert (job); + int64_t total = _film->length().frames (_film->video_frame_rate ()); + 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; + } + if (total) { job->set_progress (float (_full_written + _fake_written + _repeat_written) / total); } } |
