diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-09-26 13:29:59 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-16 17:57:18 +0200 |
| commit | 6b13ea7afe677cc4f727371d507c49be3af984db (patch) | |
| tree | a4ae4873f38235180c38841fff7792254edf92b3 /src/lib/j2k_encoder.cc | |
| parent | 9df4e636e2e35be7b17d1a507d6906d257bf83a2 (diff) | |
Create a single DcpomaticContext for all GrokContexts, rather than copying them.
I think this makes sense, and also allows us to forward-declare the
contexts in a forthcoming commit.
Diffstat (limited to 'src/lib/j2k_encoder.cc')
| -rw-r--r-- | src/lib/j2k_encoder.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/j2k_encoder.cc b/src/lib/j2k_encoder.cc index 22f2ea6d7..fe63deacd 100644 --- a/src/lib/j2k_encoder.cc +++ b/src/lib/j2k_encoder.cc @@ -68,7 +68,7 @@ J2KEncoder::J2KEncoder(shared_ptr<const Film> film, Writer& writer) , _history (200) , _writer (writer) #ifdef DCPOMATIC_GROK - , _dcpomatic_context(film, writer, _history, Config::instance()->gpu_binary_location()) + , _dcpomatic_context(new grk_plugin::DcpomaticContext(film, writer, _history, Config::instance()->gpu_binary_location())) , _context(Config::instance()->enable_gpu() ? new grk_plugin::GrokContext(_dcpomatic_context) : nullptr) #endif { @@ -84,6 +84,7 @@ J2KEncoder::~J2KEncoder () #ifdef DCPOMATIC_GROK delete _context; + delete _dcpomatic_context; #endif } |
