aboutsummaryrefslogtreecommitdiffstats
path: root/test/read_tags.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/read_tags.c')
-rw-r--r--test/read_tags.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/read_tags.c b/test/read_tags.c
index 3e5e523bf..64535a87f 100644
--- a/test/read_tags.c
+++ b/test/read_tags.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -18,6 +18,7 @@
*/
#include "config.h"
+#include "io_thread.h"
#include "decoder_list.h"
#include "decoder_api.h"
#include "input_init.h"
@@ -32,6 +33,7 @@
#include <assert.h>
#include <unistd.h>
+#include <stdlib.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
@@ -164,6 +166,13 @@ int main(int argc, char **argv)
decoder_name = argv[1];
path = argv[2];
+ io_thread_init();
+ if (!io_thread_start(&error)) {
+ g_warning("%s", error->message);
+ g_error_free(error);
+ return EXIT_FAILURE;
+ }
+
if (!input_stream_global_init(&error)) {
g_warning("%s", error->message);
g_error_free(error);
@@ -195,6 +204,8 @@ int main(int argc, char **argv)
decoder_plugin_deinit_all();
input_stream_global_finish();
+ io_thread_deinit();
+
if (tag == NULL) {
g_printerr("Failed to read tags\n");
return 1;