diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index f454c4359a..91bb606a2e 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -341,7 +341,7 @@ gst_validate_report_area_get_name (GstValidateReportArea area) } } -void +gboolean gst_validate_report_check_abort (GstValidateReport * report) { if ((report->level <= GST_VALIDATE_REPORT_LEVEL_ISSUE && @@ -350,9 +350,11 @@ gst_validate_report_check_abort (GstValidateReport * report) _gst_validate_flags & GST_VALIDATE_FATAL_WARNINGS) || (report->level <= GST_VALIDATE_REPORT_LEVEL_CRITICAL && _gst_validate_flags & GST_VALIDATE_FATAL_CRITICALS)) { - g_error ("Fatal report received: %" GST_VALIDATE_ERROR_REPORT_PRINT_FORMAT, - GST_VALIDATE_REPORT_PRINT_ARGS (report)); + + return TRUE; } + + return FALSE; } GstValidateIssueId diff --git a/validate/gst/validate/gst-validate-report.h b/validate/gst/validate/gst-validate-report.h index 174574088e..a43d8a2add 100644 --- a/validate/gst/validate/gst-validate-report.h +++ b/validate/gst/validate/gst-validate-report.h @@ -195,7 +195,7 @@ GstValidateReport *gst_validate_report_ref (GstValidateReport * report); GstValidateIssueId gst_validate_report_get_issue_id (GstValidateReport * report); -void gst_validate_report_check_abort (GstValidateReport * report); +gboolean gst_validate_report_check_abort (GstValidateReport * report); void gst_validate_report_printf (GstValidateReport * report); const gchar * gst_validate_report_level_get_name (GstValidateReportLevel level); diff --git a/validate/gst/validate/gst-validate-reporter.c b/validate/gst/validate/gst-validate-reporter.c index cae1c9a03f..d32ddd0ac8 100644 --- a/validate/gst/validate/gst-validate-reporter.c +++ b/validate/gst/validate/gst-validate-reporter.c @@ -150,14 +150,20 @@ gst_validate_report_valist (GstValidateReporter * reporter, g_free (combo); #endif - gst_validate_report_check_abort (report); - if (priv->runner) { gst_validate_runner_add_report (priv->runner, report); } else { gst_validate_report_unref (report); } + if (gst_validate_report_check_abort (report)) { + if (priv->runner) + gst_validate_runner_printf (priv->runner); + + g_error ("Fatal report received: %" GST_VALIDATE_ERROR_REPORT_PRINT_FORMAT, + GST_VALIDATE_REPORT_PRINT_ARGS (report)); + } + g_free (message); }