From 08975e369630163a054031486328d715bdc15802 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Wed, 23 Sep 2020 21:01:11 +0200 Subject: [PATCH] fix non-ffmpeg errors not killing ffmpeg --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 2a69e1d..0f6092e 100644 --- a/index.js +++ b/index.js @@ -528,9 +528,9 @@ module.exports = async (config = {}) => { } // End while loop outProcess.stdin.end(); - - outProcess.kill(); } finally { + outProcess.kill(); + if (verbose) console.log('Cleanup'); if (frameSource1) await frameSource1.close(); if (frameSource2) await frameSource2.close();