diff --git a/plugins/tracers/gstlatency.c b/plugins/tracers/gstlatency.c index 24760471f3..634fbed135 100644 --- a/plugins/tracers/gstlatency.c +++ b/plugins/tracers/gstlatency.c @@ -353,20 +353,16 @@ do_drop_sub_latency_event (GstPad * pad, GstPadProbeInfo * info, GstElement *peer_parent = get_real_pad_parent (peer_pad); const GValue *value; gchar *element_id = g_strdup_printf ("%p", peer_parent); - gchar *element_name = gst_element_get_name (peer_parent); gchar *pad_name = gst_pad_get_name (peer_pad); - const gchar *value_element_id, *value_element_name, *value_pad_name; + const gchar *value_element_id, *value_pad_name; /* Get the element id, element name and pad name from data */ value = gst_structure_id_get_value (data, latency_probe_element_id); value_element_id = g_value_get_string (value); - value = gst_structure_id_get_value (data, latency_probe_element); - value_element_name = g_value_get_string (value); value = gst_structure_id_get_value (data, latency_probe_pad); value_pad_name = g_value_get_string (value); if (!g_str_equal (value_element_id, element_id) || - !g_str_equal (value_element_name, element_name) || !g_str_equal (value_pad_name, pad_name)) { GST_DEBUG ("%s_%s: Dropping sub-latency event", GST_DEBUG_PAD_NAME (pad)); @@ -374,7 +370,6 @@ do_drop_sub_latency_event (GstPad * pad, GstPadProbeInfo * info, } g_free (pad_name); - g_free (element_name); g_free (element_id); } } @@ -420,20 +415,16 @@ do_push_event_pre (GstTracer * self, guint64 ts, GstPad * pad, GstEvent * ev) if (gst_structure_get_name_id (data) == sub_latency_probe_id) { const GValue *value; gchar *element_id = g_strdup_printf ("%p", peer_parent); - gchar *element_name = gst_element_get_name (peer_parent); gchar *pad_name = gst_pad_get_name (peer_pad); - const gchar *value_element_id, *value_element_name, *value_pad_name; + const gchar *value_element_id, *value_pad_name; /* Get the element id, element name and pad name from data */ value = gst_structure_id_get_value (data, latency_probe_element_id); value_element_id = g_value_get_string (value); - value = gst_structure_id_get_value (data, latency_probe_element); - value_element_name = g_value_get_string (value); value = gst_structure_id_get_value (data, latency_probe_pad); value_pad_name = g_value_get_string (value); if (!g_str_equal (value_element_id, element_id) || - !g_str_equal (value_element_name, element_name) || !g_str_equal (value_pad_name, pad_name)) { GST_DEBUG ("%s_%s: Storing sub-latency event", GST_DEBUG_PAD_NAME (pad)); @@ -442,7 +433,6 @@ do_push_event_pre (GstTracer * self, guint64 ts, GstPad * pad, GstEvent * ev) } g_free (pad_name); - g_free (element_name); g_free (element_id); } }