mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
validate: Mark gst_validate_report a G_GNUC_PRINTF
Summary: And fix the issue it raised Reviewers: Mathieu_Du Differential Revision: http://phabricator.freedesktop.org/D213 Depends on D211
This commit is contained in:
parent
1dc3816943
commit
dbcb6d5614
4 changed files with 12 additions and 11 deletions
|
@ -1721,7 +1721,7 @@ gst_validate_pad_monitor_downstream_event_check (GstValidatePadMonitor *
|
|||
if ((exp_segment->rate * exp_segment->applied_rate !=
|
||||
segment->rate * segment->applied_rate))
|
||||
GST_VALIDATE_REPORT (pad_monitor, EVENT_NEW_SEGMENT_MISMATCH,
|
||||
"Rate * applied_rate %d != expected %d",
|
||||
"Rate * applied_rate %f != expected %f",
|
||||
segment->rate * segment->applied_rate,
|
||||
exp_segment->rate * exp_segment->applied_rate);
|
||||
if (exp_segment->start != segment->start)
|
||||
|
@ -1928,9 +1928,10 @@ gst_validate_pad_monitor_check_right_buffer (GstValidatePadMonitor *
|
|||
GST_BUFFER_PTS (wanted_buf) != GST_BUFFER_PTS (buffer)) {
|
||||
|
||||
GST_VALIDATE_REPORT (pad_monitor, WRONG_BUFFER,
|
||||
"buffer %" GST_PTR_FORMAT " PTS %ld"
|
||||
" different than expected: %ld", buffer,
|
||||
GST_BUFFER_PTS (buffer), GST_BUFFER_PTS (wanted_buf));
|
||||
"buffer %" GST_PTR_FORMAT " PTS %" GST_TIME_FORMAT
|
||||
" different than expected: %" GST_TIME_FORMAT, buffer,
|
||||
GST_TIME_ARGS (GST_BUFFER_PTS (buffer)),
|
||||
GST_TIME_ARGS (GST_BUFFER_PTS (wanted_buf)));
|
||||
|
||||
ret = FALSE;
|
||||
}
|
||||
|
|
|
@ -239,11 +239,11 @@ gst_validate_reporter_g_log_func (const gchar * log_domain,
|
|||
GstValidateReporter * reporter)
|
||||
{
|
||||
if (log_level & G_LOG_LEVEL_CRITICAL)
|
||||
GST_VALIDATE_REPORT (reporter, G_LOG_CRITICAL, message);
|
||||
GST_VALIDATE_REPORT (reporter, G_LOG_CRITICAL, "%s", message);
|
||||
else if (log_level & G_LOG_LEVEL_WARNING)
|
||||
GST_VALIDATE_REPORT (reporter, G_LOG_WARNING, message);
|
||||
GST_VALIDATE_REPORT (reporter, G_LOG_WARNING, "%s", message);
|
||||
else
|
||||
GST_VALIDATE_REPORT (reporter, G_LOG_ISSUE, message);
|
||||
GST_VALIDATE_REPORT (reporter, G_LOG_ISSUE, "%s", message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -273,7 +273,7 @@ void
|
|||
gst_validate_reporter_report_simple (GstValidateReporter * reporter,
|
||||
GstValidateIssueId issue_id, const gchar * message)
|
||||
{
|
||||
gst_validate_report (reporter, issue_id, message);
|
||||
gst_validate_report (reporter, issue_id, "%s", message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -100,7 +100,7 @@ const gchar * gst_validate_reporter_get_name (GstValidateReporter * r
|
|||
GstValidateRunner * gst_validate_reporter_get_runner (GstValidateReporter *reporter);
|
||||
void gst_validate_reporter_init (GstValidateReporter * reporter, const gchar *name);
|
||||
void gst_validate_report (GstValidateReporter * reporter, GstValidateIssueId issue_id,
|
||||
const gchar * format, ...);
|
||||
const gchar * format, ...) G_GNUC_PRINTF (3, 4) G_GNUC_NO_INSTRUMENT;
|
||||
void gst_validate_report_valist (GstValidateReporter * reporter, GstValidateIssueId issue_id,
|
||||
const gchar * format, va_list var_args);
|
||||
void
|
||||
|
|
|
@ -232,7 +232,7 @@ compare_tags (GstMediaDescriptor * ref, StreamNode * rstream,
|
|||
|
||||
GST_VALIDATE_REPORT (ref, FILE_TAG_DETECTION_INCORRECT,
|
||||
"Reference descriptor for stream %s has NO tags"
|
||||
" but tags found: %s", all_tags->str);
|
||||
" but tags found: %s", rstream->id, all_tags->str);
|
||||
|
||||
g_string_free (all_tags, TRUE);
|
||||
|
||||
|
@ -251,7 +251,7 @@ compare_tags (GstMediaDescriptor * ref, StreamNode * rstream,
|
|||
|
||||
GST_VALIDATE_REPORT (ref, FILE_TAG_DETECTION_INCORRECT,
|
||||
"Reference descriptor for stream %s has tags:\n %s\n"
|
||||
" but NO tags found on the stream");
|
||||
" but NO tags found on the stream", rstream->id, all_tags->str);
|
||||
|
||||
g_string_free (all_tags, TRUE);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue