From 1aac0b10c9499db77cbe39e43a0abc8cccc72079 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Oct 2014 20:02:13 +0200 Subject: test/run_input, ...: add struct ScopeIOThread Auto-stop the IO thread in all error handlers. --- test/run_output.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test/run_output.cxx') 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; -- cgit v1.2.3