From 8b56fbac5f09cbe7654433194c2176a2aaa9edc9 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 23 Jun 2005 13:29:27 +0000 Subject: [PATCH] Documentation patch indicating that factory information may be overridden after a plugin is loaded (#308766). Original commit message from CVS: Reviewed by: Ronald S. Bultje * docs/manual/advanced-autoplugging.xml: * gst/gstelementfactory.c: Documentation patch indicating that factory information may be overridden after a plugin is loaded (#308766). --- ChangeLog | 9 +++++++++ docs/manual/advanced-autoplugging.xml | 4 +++- gst/gstelementfactory.c | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dc1da2d972..31445473a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-06-23 Akos Maroy + + Reviewed by: Ronald S. Bultje + + * docs/manual/advanced-autoplugging.xml: + * gst/gstelementfactory.c: + Documentation patch indicating that factory information may + be overridden after a plugin is loaded (#308766). + 2005-06-22 Thomas Vander Stichele * gst/gstcaps.c: (gst_caps_from_string_inplace): diff --git a/docs/manual/advanced-autoplugging.xml b/docs/manual/advanced-autoplugging.xml index f7becf9e1c..590326c1a5 100644 --- a/docs/manual/advanced-autoplugging.xml +++ b/docs/manual/advanced-autoplugging.xml @@ -418,12 +418,14 @@ try_to_plug (GstPad *pad, res = gst_caps_intersect (caps, templ->caps); if (res && !gst_caps_is_empty (res)) { GstElement *element; + const gchar *name_template = g_strdup (templ->name_template); /* close link and return */ gst_caps_free (res); element = gst_element_factory_create (factory, NULL); - close_link (pad, element, templ->name_template, + close_link (pad, element, name_template, gst_element_factory_get_pad_templates (factory)); + g_free (name_template); return; } gst_caps_free (res); diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index d196bd8bc0..135192657c 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -280,6 +280,9 @@ error: * Create a new element of the type defined by the given elementfactory. * It will be given the name supplied, since all elements require a name as * their first argument. + * This call may invalidate properties of the factory it works on, so + * make sure not to use any previously aquired properties of the factory + * after the call. * * Returns: new #GstElement or NULL if the element couldn't be created */