diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2006-06-30 13:17:46 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2006-06-30 13:17:46 +0000 |
commit | 565199efa8ce3c80310361bf73e59dc982656193 (patch) | |
tree | bb25974ad117f48b7bb3ce2bbb334b10f8a9a2f2 /gst/gstbin.c | |
parent | 3800e5ac9ced95a46498bf30456b28dcd0fd070c (diff) |
gst/: Fix deserialisation from XML. Set parent manually instead of using gst_bin_add(), since gst_bin_add() will unli...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_restore_thyself):
* gst/gstxml.c: (gst_xml_make_element):
Fix deserialisation from XML. Set parent manually
instead of using gst_bin_add(), since gst_bin_add()
will unlink all pads of the element being added.
Fixes #341667.
Diffstat (limited to 'gst/gstbin.c')
-rw-r--r-- | gst/gstbin.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gst/gstbin.c b/gst/gstbin.c index 49296b736..38c41b303 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -2634,15 +2634,8 @@ gst_bin_restore_thyself (GstObject * object, xmlNodePtr self) childlist = field->xmlChildrenNode; while (childlist) { if (!strcmp ((char *) childlist->name, "element")) { - GstElement *element = - gst_xml_make_element (childlist, GST_OBJECT (bin)); - - /* it had to be parented to find the pads, now we ref and unparent so - * we can add it to the bin */ - gst_object_ref (element); - gst_object_unparent (GST_OBJECT (element)); - - gst_bin_add (bin, element); + /* gst_xml_make_element will gst_bin_add() the element to ourself */ + gst_xml_make_element (childlist, GST_OBJECT (bin)); } childlist = childlist->next; } |