Commit 50ea0373 authored by Thibault Saunier's avatar Thibault Saunier 🌵

validate: Enhance debug message when we can't figure out negotiation failures

parent c3101300
......@@ -516,6 +516,9 @@ _generate_not_negotiated_error_report (GstMessage * msg)
GST_ERROR ("We should always be able to generate a detailed report"
" about why negotiation failed. Please report a bug against"
" gst-devtools:validate with this message and a way to reproduce.");
g_string_free (str, TRUE);
return NULL;
}
gst_object_replace ((GstObject **) & last_query_caps_fail_monitor, NULL);
......@@ -596,8 +599,14 @@ _bus_handler (GstBus * bus, GstMessage * message,
|| g_error_matches (err, GST_STREAM_ERROR, GST_STREAM_ERROR_FORMAT)) {
gchar *report = _generate_not_negotiated_error_report (message);
GST_VALIDATE_REPORT (monitor, NOT_NEGOTIATED, "%s", report);
g_free (report);
if (report) {
GST_VALIDATE_REPORT (monitor, NOT_NEGOTIATED, "%s", report);
g_free (report);
} else {
GST_VALIDATE_REPORT (monitor, ERROR_ON_BUS,
"Got error: %s -- Debug message: %s (%" GST_PTR_FORMAT ")",
err->message, debug, details);
}
} else {
GST_VALIDATE_REPORT (monitor, ERROR_ON_BUS,
"Got error: %s -- Debug message: %s (%" GST_PTR_FORMAT ")",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment