nlecomposition: ensure elements pending to be added are not leaked
authorAurélien Zanelli <aurelien.zanelli@darkosphere.fr>
Sat, 7 May 2016 18:29:22 +0000 (20:29 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Sat, 14 May 2016 23:50:16 +0000 (20:50 -0300)
commit62456af2a28c580a52546ef6be0f4a41d72cdd9c
tree3ea7fe080728a7728540752eb62f1efa5ebc772d
parentdd5bf558c2074a7f9a6c552d1d1acdbd749ef2b7
nlecomposition: ensure elements pending to be added are not leaked

When nlecomposition is finalized with pending add action or io,
associated elements are not unreffed as they should since caller gives
us the reference when calling gst_bin_add causing them to be leaked.
So to make sure we don't leak a reference on element when adding one to
the bin, each stage (action and pending_io) hold a reference on element
and release it when stage is done.

https://bugzilla.gnome.org/show_bug.cgi?id=766455
plugins/nle/nlecomposition.c