From: Sebastian Dröge Date: Thu, 24 Oct 2019 22:41:27 +0000 (+0300) Subject: tee: First deactivate the pad and then remove it when releasing pads X-Git-Tag: 1.16.2~6 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fgstreamer.git;a=commitdiff_plain;h=44623cacd637efb8f6cf93512238cdad575b9f60 tee: First deactivate the pad and then remove it when releasing pads This reverts a96002bb28c21b30fb9338a4620ad20504c70aa5, which is not necessary anymore. If we release the pad after removing it then none of the deactivation code will actually be called because the pad has no parent anymore, and we require a parent on the pad for deactivation to happen. This can then, among other things, cause a streaming thread to be still stuck in a pad probe because the pad was never flushed, and waiting there forever because now the pad will actually never be flushed anymore. --- diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index 8b28a97..0ff7527 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -460,12 +460,8 @@ gst_tee_release_pad (GstElement * element, GstPad * pad) } GST_OBJECT_UNLOCK (tee); - gst_object_ref (pad); - gst_element_remove_pad (GST_ELEMENT_CAST (tee), pad); - gst_pad_set_active (pad, FALSE); - - gst_object_unref (pad); + gst_element_remove_pad (GST_ELEMENT_CAST (tee), pad); if (changed) { gst_tee_notify_alloc_pad (tee);