+ /* Handling the asyncmsgq between the source output and the sink input
+ * requires some care. When the source output is unlinked, nothing needs
+ * to be done for the asyncmsgq, because the source output is the sending
+ * end. But when the sink input is unlinked, we should ensure that the
+ * asyncmsgq is emptied, because the messages in the queue hold references
+ * to the sink input. Also, we need to ensure that new messages won't be
+ * written to the queue after we have emptied it.
+ *
+ * Emptying the queue can be done in the state_changed() callback of the
+ * sink input, when the new state is "unlinked".
+ *
+ * Preventing new messages from being written to the queue can be achieved
+ * by unlinking the source output before unlinking the sink input. There
+ * are no other writers for that queue, so this is sufficient. */