tracer/latency: clear qdata

When reading the qdata, clear it to avoid it being read and unreffed again.
Fixes #774332
This commit is contained in:
Stefan Sauer 2016-12-07 21:53:49 +01:00
parent b6e3a0a2dc
commit cfb6c7d4f5

View file

@ -149,8 +149,11 @@ calculate_latency (GstElement * parent, GstPad * pad, guint64 ts)
GST_OBJECT_FLAG_IS_SET (parent, GST_ELEMENT_FLAG_SINK)) {
GstEvent *ev = g_object_get_qdata ((GObject *) pad, latency_probe_id);
log_latency (gst_event_get_structure (ev), pad, ts);
gst_event_unref (ev);
if (ev) {
g_object_set_qdata ((GObject *) pad, latency_probe_id, NULL);
log_latency (gst_event_get_structure (ev), pad, ts);
gst_event_unref (ev);
}
}
}