mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
- fix gst_element_unlink, only unlink pads that belong to the dest element. (closes bug #105571)
Original commit message from CVS: - fix gst_element_unlink, only unlink pads that belong to the dest element. (closes bug #105571)
This commit is contained in:
parent
48c70d75cb
commit
9e1ed8d760
1 changed files with 7 additions and 3 deletions
|
@ -1727,11 +1727,15 @@ gst_element_unlink (GstElement *src, GstElement *dest)
|
|||
while (srcpads) {
|
||||
pad = GST_PAD_CAST (srcpads->data);
|
||||
|
||||
if (GST_IS_REAL_PAD (pad) && GST_PAD_DIRECTION (pad) == GST_PAD_SRC) {
|
||||
/* we only care about real src pads */
|
||||
if (GST_IS_REAL_PAD (pad) && GST_PAD_IS_SRC (pad)) {
|
||||
GstPad *peerpad = GST_PAD_PEER (pad);
|
||||
|
||||
if (peerpad &&
|
||||
(GST_OBJECT_PARENT (GST_PAD_PEER (peerpad)) == (GstObject*) src)) {
|
||||
/* see if the pad is connected and is really a pad
|
||||
* of dest */
|
||||
if (peerpad &&
|
||||
(GST_OBJECT_PARENT (peerpad) == (GstObject*) dest))
|
||||
{
|
||||
gst_pad_unlink (pad, peerpad);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue