record: Improve handling when closing the stream
Currently, closing a recording stream crashes in ffmpeg. This fixes that and also an error printed by pipewire about setting stream active on the wrong thread.
Edited by Nate Graham
Currently, closing a recording stream crashes in ffmpeg. This fixes that and also an error printed by pipewire about setting stream active on the wrong thread.