input_plugin: method init() returns errors with GError

Not used by any plugin currently, but this eliminates the g_error()
call in input_plugin_config(), so it's worth it.
This commit is contained in:
Max Kellermann
2009-12-14 22:29:46 +01:00
parent f70d2f58a1
commit 786c1f035f
9 changed files with 79 additions and 15 deletions

View File

@@ -138,6 +138,7 @@ decoder_tag(G_GNUC_UNUSED struct decoder *decoder,
int main(int argc, char **argv)
{
GError *error = NULL;
bool ret;
const char *decoder_name;
struct decoder decoder;
@@ -152,7 +153,12 @@ int main(int argc, char **argv)
g_log_set_default_handler(my_log_func, NULL);
input_stream_global_init();
if (!input_stream_global_init(&error)) {
g_warning("%s", error->message);
g_error_free(error);
return 2;
}
decoder_plugin_init_all();
decoder.plugin = decoder_plugin_from_name(decoder_name);