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.
This commit is contained in:
Max Kellermann
2011-09-16 21:06:12 +02:00
parent 6f655eb9b9
commit 29241c4f83
7 changed files with 78 additions and 0 deletions

View File

@@ -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;
}