stream: don't listen for close event for audio

This commit is contained in:
dumbmoron 2023-11-06 01:48:49 +00:00
parent 4a9e4cd915
commit 7a3be8b981
No known key found for this signature in database
GPG key ID: C59997C76C6A8E5F

View file

@ -96,7 +96,9 @@ export async function streamLiveRender(streamInfo, res) {
res.setHeader('Connection', 'keep-alive');
res.setHeader('Content-Disposition', contentDisposition(streamInfo.filename));
pipe(audio, audioInput, shutdown);
audio.on('error', shutdown);
audioInput.on('error', shutdown);
audio.pipe(audioInput);
pipe(muxOutput, res, shutdown);
process.on('close', shutdown);