validate:tools: Do not forget to give a ref for reporter's reports

Also enhance a bit report 'wording'
This commit is contained in:
Thibault Saunier 2014-01-22 23:22:59 +01:00
parent 3bce8f8966
commit 7b236c96bf
2 changed files with 6 additions and 5 deletions

View 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;
}

View 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) {