After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 635067 - [*decodebin*] pad template leaked
[*decodebin*] pad template leaked
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2010-11-17 12:19 UTC by Harri Mähönen
Modified: 2010-11-18 00:35 UTC
See Also:
GNOME target: ---
GNOME version: ---

Unref the pad templates given for ghostpads (4.45 KB, patch)
2010-11-17 12:19 UTC, Harri Mähönen
committed Details | Review

Description Harri Mähönen 2010-11-17 12:19:16 UTC
Created attachment 174675 [details] [review]
Unref the pad templates given for ghostpads

There is a memory leak with setting pad-templates for ghostpads introduced by commit 2a00fefd2adaf4c1c87a5f368b9252ef016f9e26.

gst_static_pad_template_get() is used to get a GstPadTemplate out of static pad template. This is then given to gst_ghost_pad_new_from_template (or when creating a new decode pad), which does a ref, but does not take ownership. 

Attached is a patch that unrefs the pad template after it's used.
Comment 1 Tim-Philipp Müller 2010-11-18 00:35:01 UTC
Fixed, thanks!

commit 8a423f8f00c5cb0e1ca9161be39b319967dbccb3
Author: Tim-Philipp Müller <>
Date:   Thu Nov 18 00:33:22 2010 +0000

    decodebin: fix one more pad template ref leak

commit 7c5e39664e68700d8895c1873c2a070d1bde3ff8
Author: Harri Mähönen <>
Date:   Wed Nov 17 10:14:59 2010 +0200

    *decodebin*: don't leak pad templates set on ghostpads