leaking recording streams
Summary
When a stream is monitoring a corked sink input, that stream doesn't properly get unlinked. May or may not actually be pipewire's fault. This is particularly egregious with plasma's pa UI which creates temporary volume meter streams regularly.
Also see https://bugs.kde.org/show_bug.cgi?id=467117
environment
Steps to reproduce
I am attaching a tiny source sample that shows this issue.
What is the current bug behavior?
When the stream gets unrefed it doesn't actually get freed. Instead it seems to be stuck waiting for a reply. Eventually this will time out and the stream does get freed. It does not get unlinked correctly for unknown reasons. This can be seen in patch bay UIs (such as qpwgraph) where there will still be a connection held between the demo app and the sink input. I suggest adding some debug output to stream_unlink, stream_free, and the ref/unref functions to see what's going on.
What is the expected correct behavior?
The stream should be completely unlinked and deleted.