New clients hang after unlinking blocked pw-cat
pipewire
Compiled with libpipewire 0.3.63
Linked with libpipewire 0.3.63
Unlinking a blocked pw-cat reading from stdin causes new pulse/alsa clients to hang while trying to play sound. Jack clients do not appear to hang, however no audio is output despite them being linked to a sink.
Re-linking pw-cat to a sink does not restore any functionality. The only way to get the new clients to unhang is to Ctrl C the pw-cat instance.
Steps to reproduce:
- Run
sleep 24h | pw-cat -p --rate 48000 --format s16 --channels 1 -
- Unlink both channels (not sure why there are two, since only one is specified)
pw-link -d "pw-cat:output_FL" "alsa_output.pci-0000_01_02.0.analog-stereo:playback_FL"
pw-link -d "pw-cat:output_FR" "alsa_output.pci-0000_01_02.0.analog-stereo:playback_FR"
- Spawn a new application that tries to play audio. This is important because existing applications will continue playing audio unaffected.
- For example,
mpv
with--ao=pulse
or--ao=alsa
.
- For example,
- The application will hang trying to play back audio until pw-cat is closed.
Worth noting that this only happens when pw-cat is blocked. It can not be reproduced with, for example, ffmpeg -i some_2ch_44100_audio_file -f s16le - | pw-cat -p --channels 2 --rate 44100 --format s16 -
.
Additional system information:
Ubuntu 20.04.5
Linux kernel 6.0.15