aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_input.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-16 21:06:12 +0200
committerMax Kellermann <max@duempel.org>2011-09-16 21:22:02 +0200
commit29241c4f835797f635816a9f37528aa981f722b5 (patch)
treeda166b242c4d960619498b9b7bd13ec44415915d /test/run_input.c
parent6f655eb9b90e0855112038c0779eb61194cb7ef6 (diff)
downloadmpd-29241c4f835797f635816a9f37528aa981f722b5.tar.gz
mpd-29241c4f835797f635816a9f37528aa981f722b5.tar.xz
mpd-29241c4f835797f635816a9f37528aa981f722b5.zip
input_plugin: add method check()
To check for errors without reading. The decoder thread wants to do that, before it passes the input stream to the plugin.
Diffstat (limited to 'test/run_input.c')
-rw-r--r--test/run_input.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/run_input.c b/test/run_input.c
index c00698dff..651d36480 100644
--- a/test/run_input.c
+++ b/test/run_input.c
@@ -100,6 +100,12 @@ dump_input_stream(struct input_stream *is)
break;
}
+ if (!input_stream_check(is, &error)) {
+ g_warning("%s", error->message);
+ g_error_free(error);
+ return EXIT_FAILURE;
+ }
+
return 0;
}