diff options
author | Max Kellermann <max@musicpd.org> | 2019-02-05 21:50:31 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-02-05 22:07:49 +0100 |
commit | 9e73ea77b4ccd4131823ddc156322a2e4082d417 (patch) | |
tree | 50a5ed0b8b1eafd0e130ff757e700b9bda780504 /test/RunChromaprint.cxx | |
parent | b0739eca87439a8f9cc2a0f9a6fcba1f68708df6 (diff) |
input/Init: add RAII class
Diffstat (limited to 'test/RunChromaprint.cxx')
-rw-r--r-- | test/RunChromaprint.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/RunChromaprint.cxx b/test/RunChromaprint.cxx index dcbd75d2e..3da471f77 100644 --- a/test/RunChromaprint.cxx +++ b/test/RunChromaprint.cxx @@ -90,15 +90,15 @@ ParseCommandLine(int argc, char **argv) class GlobalInit { const ConfigData config; EventThread io_thread; + const ScopeInputPluginsInit input_plugins_init; public: explicit GlobalInit(Path config_path) - :config(AutoLoadConfigFile(config_path)) + :config(AutoLoadConfigFile(config_path)), + input_plugins_init(config, io_thread.GetEventLoop()) { io_thread.Start(); - input_stream_global_init(config, - io_thread.GetEventLoop()); decoder_plugin_init_all(config); pcm_convert_global_init(config); @@ -106,7 +106,6 @@ public: ~GlobalInit() { decoder_plugin_deinit_all(); - input_stream_global_finish(); } }; |