mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
Fix the case where one of the pads is a ghostpad.
Original commit message from CVS: Fix the case where one of the pads is a ghostpad.
This commit is contained in:
parent
795ecdcc86
commit
d939cb1a4f
1 changed files with 10 additions and 3 deletions
|
@ -1592,14 +1592,21 @@ gst_element_disconnect (GstElement *src, GstElement *dest)
|
|||
g_return_if_fail (GST_IS_ELEMENT(src));
|
||||
g_return_if_fail (GST_IS_ELEMENT(dest));
|
||||
|
||||
GST_DEBUG (GST_CAT_ELEMENT_PADS, "disconnecting \"%s\" and \"%s\"", GST_ELEMENT_NAME (src),
|
||||
GST_ELEMENT_NAME (dest));
|
||||
|
||||
srcpads = gst_element_get_pad_list (src);
|
||||
|
||||
while (srcpads) {
|
||||
pad = GST_PAD_CAST (srcpads->data);
|
||||
|
||||
if (GST_PAD_DIRECTION (pad) == GST_PAD_SRC)
|
||||
if (GST_OBJECT_PARENT (GST_PAD_PEER (pad)) == (GstObject*) dest)
|
||||
gst_pad_disconnect (pad, GST_PAD_PEER (pad));
|
||||
if (GST_IS_REAL_PAD (pad) && GST_PAD_DIRECTION (pad) == GST_PAD_SRC) {
|
||||
GstPad *peerpad = GST_PAD_PEER (pad);
|
||||
|
||||
if (peerpad && (GST_OBJECT_PARENT (GST_PAD_PEER (peerpad)) == (GstObject*) src)) {
|
||||
gst_pad_disconnect (pad, peerpad);
|
||||
}
|
||||
}
|
||||
|
||||
srcpads = g_list_next (srcpads);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue