mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
validate: report: Handle when reporting NULL action
And add information about the action repeat state.
This commit is contained in:
parent
449674459a
commit
2b32a68df1
1 changed files with 14 additions and 4 deletions
|
@ -344,18 +344,28 @@ gst_validate_report_action (GstValidateReporter * reporter,
|
|||
const gchar * format, ...)
|
||||
{
|
||||
va_list var_args;
|
||||
gchar *f = g_strdup_printf ("\n> %s:%d\n> %d | %s\n> %*c|\n",
|
||||
gint nrepeats;
|
||||
gchar *f, *repeat = NULL;
|
||||
|
||||
if (action && gst_structure_get_int (action->structure, "repeat", &nrepeats))
|
||||
repeat =
|
||||
g_strdup_printf (" (repeat: %d/%d)", nrepeats - action->repeat + 1,
|
||||
nrepeats);
|
||||
|
||||
f = action ? g_strdup_printf ("\n> %s:%d%s\n> %d | %s\n> %*c|\n",
|
||||
GST_VALIDATE_ACTION_FILENAME (action),
|
||||
GST_VALIDATE_ACTION_LINENO (action), GST_VALIDATE_ACTION_LINENO (action),
|
||||
format,
|
||||
GST_VALIDATE_ACTION_LINENO (action), repeat ? repeat : "",
|
||||
GST_VALIDATE_ACTION_LINENO (action), format,
|
||||
(gint) floor (log10 (abs ((GST_VALIDATE_ACTION_LINENO (action))))) + 1,
|
||||
' ');
|
||||
' ')
|
||||
: g_strdup (format);
|
||||
|
||||
va_start (var_args, format);
|
||||
gst_validate_report_valist (reporter, issue_id, f, var_args);
|
||||
va_end (var_args);
|
||||
|
||||
g_free (f);
|
||||
g_free (repeat);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue