latency: fix custom event leaks
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Tue, 6 Aug 2019 04:39:22 +0000 (10:09 +0530)
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>
Wed, 14 Aug 2019 03:21:06 +0000 (08:51 +0530)
commita9bc30b51c697065fe509b3b7dbad4a46061ea07
tree8a3e94f958f8aeca7a180163b30e3696542df055
parentde9ff8353398b58d2472f35fd195204c8cd4f06e
latency: fix custom event leaks

If the element before the sink needs $n buffers to produce one output
buffer, we were reffing $n events and unreffing only one.
Prevent this by using g_object_set_qdata_full() to handle the event
unreffing so we're sure no ref will be lost.
plugins/tracers/gstlatency.c