gstcheck: Call gst_check_init() before creating the suite
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 2 Apr 2009 08:43:16 +0000 (10:43 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 2 Apr 2009 08:44:23 +0000 (10:44 +0200)
This allows using the GStreamer or GObject API in the suite
creation function.

libs/gst/check/gstcheck.h

index 8fa6eb8..ec1313b 100644 (file)
@@ -415,8 +415,9 @@ fail_unless (gst_element_set_state (element,                        \
 #define GST_CHECK_MAIN(name)                                   \
 int main (int argc, char **argv)                               \
 {                                                              \
-  Suite *s = name ## _suite ();                                        \
+  Suite *s;                                                     \
   gst_check_init (&argc, &argv);                               \
+  s = name ## _suite ();                                       \
   return gst_check_run_suite (s, # name, __FILE__);            \
 }