diff options
author | Max Kellermann <max@duempel.org> | 2014-10-07 20:02:13 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-10-07 20:02:13 +0200 |
commit | 1aac0b10c9499db77cbe39e43a0abc8cccc72079 (patch) | |
tree | 4a8fa128ac33a33a7223dd53e397547b086f6fff /test/run_decoder.cxx | |
parent | e5ff85b63c0ef342b11cb1ac5b5808091f51b667 (diff) | |
download | mpd-1aac0b10c9499db77cbe39e43a0abc8cccc72079.tar.gz mpd-1aac0b10c9499db77cbe39e43a0abc8cccc72079.tar.xz mpd-1aac0b10c9499db77cbe39e43a0abc8cccc72079.zip |
test/run_input, ...: add struct ScopeIOThread
Auto-stop the IO thread in all error handlers.
Diffstat (limited to 'test/run_decoder.cxx')
-rw-r--r-- | test/run_decoder.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx index 3980340cc..0e9af6a1a 100644 --- a/test/run_decoder.cxx +++ b/test/run_decoder.cxx @@ -18,7 +18,7 @@ */ #include "config.h" -#include "IOThread.hxx" +#include "ScopeIOThread.hxx" #include "decoder/DecoderList.hxx" #include "decoder/DecoderPlugin.hxx" #include "FakeDecoderAPI.hxx" @@ -56,8 +56,7 @@ int main(int argc, char **argv) #endif #endif - io_thread_init(); - io_thread_start(); + const ScopeIOThread io_thread; Error error; if (!input_stream_global_init(error)) { @@ -98,7 +97,6 @@ int main(int argc, char **argv) decoder_plugin_deinit_all(); input_stream_global_finish(); - io_thread_deinit(); if (!decoder.initialized) { fprintf(stderr, "Decoding failed\n"); |