summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 134da6c)
raw | patch | inline | side by side (parent: 134da6c)
author | Stefan Kost <ensonic@users.sourceforge.net> | |
Wed, 19 Sep 2007 12:31:16 +0000 (12:31 +0000) | ||
committer | Stefan Kost <ensonic@users.sourceforge.net> | |
Wed, 19 Sep 2007 12:31:16 +0000 (12:31 +0000) |
Original commit message from CVS:
* gst/gstelementfactory.c:
Release static caps. Fixes #475723.
* gst/gstelementfactory.c:
Release static caps. Fixes #475723.
ChangeLog | patch | blob | history | |
gst/gstelementfactory.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index d6029cb5b2fa64b525602051543f0e4aac22487f..ea81082563210d2ebce71ce335a766927986aef7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2007-09-19 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/gstelementfactory.c:
+ Release static caps. Fixes #475723.
+
2007-09-18 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstinfo.c:
index bf0025d9923479982eef6810ac90139c08997a39..a4d40c6257fcbeaed03fdf51749498df7c1b97a4 100644 (file)
--- a/gst/gstelementfactory.c
+++ b/gst/gstelementfactory.c
for (item = factory->staticpadtemplates; item; item = item->next) {
GstStaticPadTemplate *templ = item->data;
+ GstCaps *caps = (GstCaps *) & (templ->static_caps);
g_free (templ->name_template);
g_free ((gchar *) templ->static_caps.string);
- memset (&(templ->static_caps), 0, sizeof (GstStaticCaps));
+
+ /* FIXME: this is not threadsafe */
+ if (caps->refcount == 1) {
+ GstStructure *structure;
+ guint i;
+
+ for (i = 0; i < caps->structs->len; i++) {
+ structure = (GstStructure *) gst_caps_get_structure (caps, i);
+ gst_structure_set_parent_refcount (structure, NULL);
+ gst_structure_free (structure);
+ }
+ g_ptr_array_free (caps->structs, TRUE);
+ caps->refcount = 0;
+ }
g_free (templ);
}
g_list_free (factory->staticpadtemplates);