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_output.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_output.cxx')
-rw-r--r-- | test/run_output.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/run_output.cxx b/test/run_output.cxx index e6c11669d..345127556 100644 --- a/test/run_output.cxx +++ b/test/run_output.cxx @@ -26,7 +26,7 @@ #include "Idle.hxx" #include "Main.hxx" #include "event/Loop.hxx" -#include "IOThread.hxx" +#include "ScopeIOThread.hxx" #include "fs/Path.hxx" #include "AudioParser.hxx" #include "pcm/PcmConvert.hxx" @@ -179,8 +179,7 @@ int main(int argc, char **argv) EventLoop event_loop; - io_thread_init(); - io_thread_start(); + const ScopeIOThread io_thread; /* initialize the audio output */ @@ -205,8 +204,6 @@ int main(int argc, char **argv) audio_output_free(ao); - io_thread_deinit(); - config_global_finish(); return success ? EXIT_SUCCESS : EXIT_FAILURE; |