From 409d40833644cc61f2d7c3d76b9ee618af163a50 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Sat, 29 Sep 2001 09:53:07 +0000 Subject: [PATCH] factory needs a ref to the padtemplate so that the padtemplate doesn't disappear when the plugin element is unreffed Original commit message from CVS: factory needs a ref to the padtemplate so that the padtemplate doesn't disappear when the plugin element is unreffed --- gst/gstelementfactory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index df85c38e00..8ecc553db5 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -315,7 +315,9 @@ gst_elementfactory_add_padtemplate (GstElementFactory *factory, g_return_if_fail(templ != NULL); padtemplates = factory->padtemplates; - + + gst_object_ref (GST_OBJECT (templ)); + while (padtemplates) { GstPadTemplate *oldtempl = GST_PADTEMPLATE (padtemplates->data);