summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-05-27 14:00:56 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2011-05-27 17:28:34 +0200
commita96002bb28c21b30fb9338a4620ad20504c70aa5 (patch)
tree366638b1efc7ba72326d4e0e2b06be563088487a /plugins
parent26a5a877ffca522d1782237662c350d2e615d6a4 (diff)
tee: deactivate the pad after removing it
When releasing the request pad, first remove it from the element and then deactivate it. If we do it the other way around, a gst_pad_push on the element might return wrong-state before we had a chance to detect the removed pad in the chain function.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/elements/gsttee.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c
index 4f2c8f119..304ab3b33 100644
--- a/plugins/elements/gsttee.c
+++ b/plugins/elements/gsttee.c
@@ -386,11 +386,14 @@ gst_tee_release_pad (GstElement * element, GstPad * pad)
}
GST_OBJECT_UNLOCK (tee);
- gst_pad_set_active (pad, FALSE);
-
+ gst_object_ref (pad);
gst_element_remove_pad (GST_ELEMENT_CAST (tee), pad);
+
+ gst_pad_set_active (pad, FALSE);
GST_TEE_DYN_UNLOCK (tee);
+ gst_object_unref (pad);
+
if (changed) {
gst_tee_notify_alloc_pad (tee);
}