From: Wim Taymans Date: Fri, 27 May 2011 12:00:56 +0000 (+0200) Subject: tee: deactivate the pad after removing it X-Git-Tag: RELEASE-0.11.0~216 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a96002bb28c21b30fb9338a4620ad20504c70aa5;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index 4f2c8f1..304ab3b 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); }