Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2016-10-08 14:20:58 +0300
committerStefan Sauer <ensonic@users.sf.net>2016-10-08 14:31:04 +0300
commit60f088026a9367da45a1f2b46269425fc2a6a857 (patch)
tree4ff6bf51808b2c31e53b6008e20e850930399d6d
parenta195e47633967ed09b61ab6f6e270ce9ad04cbb2 (diff)
tracer/rusage: fix format string args
The format string contains a process id, but we did not provice one. This caused us to log garbage since all args got shifted.
-rw-r--r--plugins/tracers/gstrusage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/tracers/gstrusage.c b/plugins/tracers/gstrusage.c
index c4110ecb8e..29878f348d 100644
--- a/plugins/tracers/gstrusage.c
+++ b/plugins/tracers/gstrusage.c
@@ -248,8 +248,8 @@ do_stats (GstTracer * obj, guint64 ts)
G_UNLOCK (_proc);
cur_cpuload = (guint) gst_util_uint64_scale (dtproc / num_cpus,
G_GINT64_CONSTANT (1000), dts);
- gst_tracer_record_log (tr_proc, ts, MIN (avg_cpuload, 1000),
- MIN (cur_cpuload, 1000), tproc);
+ gst_tracer_record_log (tr_proc, (guint64) getpid (), ts,
+ MIN (avg_cpuload, 1000), MIN (cur_cpuload, 1000), tproc);
/* *INDENT-ON* */
}
@@ -315,7 +315,7 @@ gst_rusage_tracer_class_init (GstRUsageTracerClass * klass)
NULL),
NULL);
tr_proc = gst_tracer_record_new ("proc-rusage.class",
- "thread-id", GST_TYPE_STRUCTURE, gst_structure_new ("scope",
+ "process-id", GST_TYPE_STRUCTURE, gst_structure_new ("scope",
"type", G_TYPE_GTYPE, G_TYPE_UINT64,
"related-to", GST_TYPE_TRACER_VALUE_SCOPE, GST_TRACER_VALUE_SCOPE_PROCESS,
NULL),