vtenc: Avoid leaking caps object and its copy
authorSebastian Rasmussen <sebras@hotmail.com>
Sat, 9 Aug 2014 11:20:41 +0000 (13:20 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 11 Aug 2014 06:48:52 +0000 (08:48 +0200)
commit2d9b8e3dd8c1b1504ce5f3e1ddc6bdc10d74afd1
treeeb2008f1591b8881026d9b662f3973f0868f971e
parentf5f967a78cb9365290ac5b36d9313daace30c03e
vtenc: Avoid leaking caps object and its copy

gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
so creating a copy using gst_caps_copy() results in a reference leak. Also
the caps are pushed as an event downstream, but this doesn't consume the
caps so it must still be unreferenced.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734534
sys/applemedia/vtenc.c