validate:tools: Do not forget to give a ref for reporter's reports
authorThibault Saunier <thibault.saunier@collabora.com>
Wed, 22 Jan 2014 22:22:59 +0000 (23:22 +0100)
committerThibault Saunier <thibault.saunier@collabora.com>
Thu, 6 Feb 2014 11:02:59 +0000 (12:02 +0100)
Also enhance a bit report 'wording'

validate/gst/validate/gst-validate-pad-monitor.c
validate/gst/validate/gst-validate-reporter.c

index cfb4266..407b47c 100644 (file)
@@ -164,9 +164,12 @@ _check_field_type (GstValidatePadMonitor * monitor, GstStructure * structure,
   gint rejected_types_index = 0;
 
   if (!gst_structure_has_field (structure, field)) {
+    gchar *str = gst_structure_to_string (structure);
+
     GST_VALIDATE_REPORT (monitor, CAPS_IS_MISSING_FIELD,
         "Field '%s' is missing from structure: %" GST_PTR_FORMAT, field,
-        structure);
+        str);
+    g_free(str);
     return;
   }
 
index 6c465e0..b046f3c 100644 (file)
@@ -116,7 +116,8 @@ gst_validate_report_valist (GstValidateReporter * reporter,
       return;
     }
 
-    g_hash_table_insert (priv->reports, (gpointer) issue_id, report);
+    g_hash_table_insert (priv->reports, (gpointer) issue_id,
+            gst_validate_report_ref (report));
   }
 
   combo =
@@ -140,9 +141,6 @@ gst_validate_report_valist (GstValidateReporter * reporter,
   combo = g_strdup_printf ("Received error report %" GST_VALIDATE_ISSUE_FORMAT
       " : %s", GST_VALIDATE_ISSUE_ARGS (issue), format);
 
-  G_VA_COPY (vacopy, var_args);
-  gst_debug_log_valist (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, __FILE__,
-      GST_FUNCTION, __LINE__, NULL, combo, vacopy);
   gst_validate_report_check_abort (report);
 
   if (priv->runner) {