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/dump_playlist.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/dump_playlist.cxx') diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx index 6205c8a79..0047ef427 100644 --- a/test/dump_playlist.cxx +++ b/test/dump_playlist.cxx @@ -25,7 +25,7 @@ #include "config/ConfigGlobal.hxx" #include "decoder/DecoderList.hxx" #include "input/Init.hxx" -#include "IOThread.hxx" +#include "ScopeIOThread.hxx" #include "playlist/PlaylistRegistry.hxx" #include "playlist/PlaylistPlugin.hxx" #include "fs/Path.hxx" @@ -82,8 +82,7 @@ int main(int argc, char **argv) return EXIT_FAILURE; } - io_thread_init(); - io_thread_start(); + const ScopeIOThread io_thread; if (!input_stream_global_init(error)) { LogError(error); @@ -155,7 +154,6 @@ int main(int argc, char **argv) decoder_plugin_deinit_all(); playlist_list_global_finish(); input_stream_global_finish(); - io_thread_deinit(); config_global_finish(); return 0; -- cgit v1.2.3