diff --git a/src/modules/stream/types.js b/src/modules/stream/types.js index bf6d7594..c584789f 100644 --- a/src/modules/stream/types.js +++ b/src/modules/stream/types.js @@ -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);