validate: redefine default cat for the runner
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 24 May 2016 14:05:30 +0000 (14:05 +0000)
committerThibault Saunier <tsaunier@gnome.org>
Tue, 24 May 2016 14:28:59 +0000 (10:28 -0400)
The gstvalidate_debug may not be initialized like with the
validate/reporting which was crashing when run with GST_DEBUG=5.

Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1004

validate/gst/validate/gst-validate-runner.c

index a7bc912..867dc9c 100644 (file)
 #include "gst-validate-override-registry.h"
 #include "gst-validate-runner.h"
 
+GST_DEBUG_CATEGORY_STATIC (gst_validate_runner_debug);
+#undef GST_CAT_DEFAULT
+#define GST_CAT_DEFAULT gst_validate_runner_debug
+
 static gboolean element_created = FALSE;
 
 /* We create a GstValidateRunner on _init ()
@@ -425,6 +429,9 @@ gst_validate_runner_class_init (GstValidateRunnerClass * klass)
   _signals[STOPPING_SIGNAL] =
       g_signal_new ("stopping", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0,
       NULL, NULL, NULL, G_TYPE_NONE, 0);
+
+  GST_DEBUG_CATEGORY_INIT (gst_validate_runner_debug, "gstvalidaterunner",
+      GST_DEBUG_FG_YELLOW, "Gst validate runner");
 }
 
 static void