diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-11-27 23:32:17 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-11-29 23:31:41 +0100 |
| commit | 2c62f1ebb8d8b5be7db966db9dc3caa02e4d8edb (patch) | |
| tree | 72acb40177daaec300bfc53fbc31204f7be2109d | |
| parent | 220a885291592236515ee8673996fe5f73591f57 (diff) | |
Cleanup: inline shutdown() in the only place it's called.
| -rw-r--r-- | src/lib/grok/context.h | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/src/lib/grok/context.h b/src/lib/grok/context.h index 77e11ec07..9b249e8d8 100644 --- a/src/lib/grok/context.h +++ b/src/lib/grok/context.h @@ -177,7 +177,22 @@ public: ~GrokContext() { - shutdown(); + if (!_messenger) { + return; + } + + std::unique_lock<std::mutex> lk_global(launchMutex); + + if (!_messenger) { + return; + } + + if (_launched) { + _messenger->shutdown(); + } + + delete _messenger; + _messenger = nullptr; } bool launch(DCPVideo dcpv, int device) @@ -256,27 +271,6 @@ public: } private: - - void shutdown() - { - if (!_messenger) { - return; - } - - std::unique_lock<std::mutex> lk_global(launchMutex); - - if (!_messenger) { - return; - } - - if (_launched) { - _messenger->shutdown(); - } - - delete _messenger; - _messenger = nullptr; - } - void frame_done() { _dcpomatic_context->history.event(); |
