diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index 78cbff7ade..361a15cf5f 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -656,12 +656,15 @@ gst_tee_handle_data (GstTee * tee, gpointer data, gboolean is_list) ret = gst_pad_push (pad, GST_BUFFER_CAST (data)); } - gst_object_unref (pad); + if (GST_TEE_PAD_CAST (pad)->removed) + ret = GST_FLOW_NOT_LINKED; if (ret == GST_FLOW_NOT_LINKED && tee->allow_not_linked) { ret = GST_FLOW_OK; } + gst_object_unref (pad); + return ret; }