diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-09-26 13:29:59 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-28 02:01:57 +0100 |
| commit | e55d917a7e3a0d2988c3f53c3027fe890970e6a8 (patch) | |
| tree | d36c33d735a51a55ee95dcbd4debb3ffe893dcd7 /src/lib/j2k_encoder.cc | |
| parent | a75cac36969942d1fcb43dadfdf60434c840af54 (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 7d695245a..1a96eb942 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 { @@ -83,6 +83,7 @@ J2KEncoder::~J2KEncoder () #ifdef DCPOMATIC_GROK delete _context; + delete _dcpomatic_context; #endif } |
