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/gstxml.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/gstxml.c')
-rw-r--r-- | gst/gstxml.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/gstxml.c b/gst/gstxml.c index 61ae6eeb2..292626ad0 100644 --- a/gst/gstxml.c +++ b/gst/gstxml.c @@ -450,8 +450,13 @@ gst_xml_make_element (xmlNodePtr cur, GstObject * parent) /* ne need to set the parent on this object bacause the pads */ /* will go through the hierarchy to link to their peers */ - if (parent) - gst_object_set_parent (GST_OBJECT (element), parent); + if (parent) { + if (GST_IS_BIN (parent)) { + gst_bin_add (GST_BIN (parent), element); + } else { + gst_object_set_parent (GST_OBJECT (element), parent); + } + } gst_object_restore_thyself (GST_OBJECT (element), cur); |