GNOME Bugzilla – Bug 734534
vtenc: Avoid leaking caps object and its copy
Last modified: 2014-08-11 06:55:59 UTC
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. The attached patch aims to fix this issue.
Created attachment 282990 [details] [review] Proposed patch.
commit b323fba934b2dc855bc7226594ed8268022f4cef Author: Sebastian Rasmussen <sebras@hotmail.com> Date: Sat Aug 9 13:20:41 2014 +0200 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