From 424477d00eab3bd050738ebf9b30d251f078fbab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 16 Oct 2015 12:00:50 +0100 Subject: [PATCH] alloctrace: show details of events and messages leaked So it's clearer what leaked. --- gst/gsttrace.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gst/gsttrace.c b/gst/gsttrace.c index 4087929..7cb0a3d 100644 --- a/gst/gsttrace.c +++ b/gst/gsttrace.c @@ -165,6 +165,20 @@ gst_alloc_trace_print (const GstAllocTrace * trace) if (type == GST_TYPE_CAPS) { extra = gst_caps_to_string (data); + } else if (type == GST_TYPE_EVENT) { + const GstStructure *s = gst_event_get_structure (data); + + if (s == NULL) + extra = g_strdup_printf ("%s", GST_EVENT_TYPE_NAME (data)); + else + extra = gst_structure_to_string (s); + } else if (type == GST_TYPE_MESSAGE) { + const GstStructure *s = gst_message_get_structure (data); + + if (s == NULL) + extra = g_strdup_printf ("%s", GST_MESSAGE_TYPE_NAME (data)); + else + extra = gst_structure_to_string (s); } refcount = GST_MINI_OBJECT_REFCOUNT_VALUE (data); } -- 2.7.4