diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-09 16:15:01 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-09 16:15:01 +0000 |
| commit | b7cedf45ed8de32fc9384d5bc18dfcdc3376111c (patch) | |
| tree | 7ad955a0b9c0a783eb922f4ccca00c8e3419541a /src/lib/writer.cc | |
| parent | c2e2b2bace98d1ad297c7351a907ed7713fa1850 (diff) | |
Bump maximum number of frames in memory for high thread counts. Make sure that we push later frames to disk where necessary rather than earlier ones.
Diffstat (limited to 'src/lib/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 8d9b5855e..21274cb83 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -48,7 +48,7 @@ using std::cout; using boost::shared_ptr; using boost::weak_ptr; -int const Writer::_maximum_frames_in_memory = 8; +int const Writer::_maximum_frames_in_memory = Config::num_local_encoding_threads() + 4; Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j) : _film (f) @@ -291,7 +291,8 @@ try Write some FULL frames to disk. */ - /* Find one */ + /* Find one from the back of the queue */ + _queue.sort (); list<QueueItem>::reverse_iterator i = _queue.rbegin (); while (i != _queue.rend() && (i->type != QueueItem::FULL || !i->encoded)) { ++i; |
