tests: fix GstBus unit test with latest GLib
authorTim-Philipp Müller <tim@centricular.com>
Mon, 18 Nov 2013 15:28:32 +0000 (15:28 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 6 Dec 2013 23:45:51 +0000 (23:45 +0000)
g_source_remove() works on the default main context, and
we're doing things with a custom context. Fixes warning
with newer GLib versions.

tests/check/gst/gstbus.c

index 6ceb71f580d2d61a9ce2430a03dd5cd73fa4b319..870a700425e782f2b0cbaa9d90e4ce9701450dcc 100644 (file)
@@ -232,7 +232,8 @@ GST_START_TEST (test_watch_with_custom_context)
   fail_unless_equals_int (num_eos, 10);
   fail_unless_equals_int (num_app, 10);
 
-  g_source_remove (id);
+  if ((source = g_main_context_find_source_by_id (ctx, id)))
+    g_source_destroy (source);
   g_main_loop_unref (main_loop);
   g_main_context_unref (ctx);