};
static void
-response_received_callback (MvsMInfoProvider *minfo_provider, GList *list,
+response_received_cb (MvsMInfoProvider *minfo_provider, GList *list,
gpointer user_data)
{
GList *tmp = NULL;
{
MvsMInfoProvider *minfo_provider = NULL;
GOptionContext *context = NULL;
- GOptionGroup *gst_option_group = NULL;
GError *error = NULL;
MvsService service = MVS_SERVICE_TMDB;
g_type_init ();
-
- g_thread_init (NULL);
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
context = g_option_context_new (" - Tests data provider behavior");
g_option_context_add_main_entries (context, entries, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error)) {
g_critical ("option parsing failed: %s", error->message);
+ g_error_free (error);
+ g_option_context_free (context);
return -1;
}
minfo_provider = mvs_minfo_provider_new ();
g_signal_connect (minfo_provider, "response-received",
- G_CALLBACK (response_received_callback), NULL);
+ G_CALLBACK (response_received_cb), NULL);
loop = g_main_loop_new (NULL, FALSE);
query);
g_main_loop_run (loop);
+
g_object_unref (minfo_provider);
g_main_loop_unref (loop);
+ g_option_context_free (context);
return 0;
}