From b4869ce32771ad0b2d56c4f285802e571a6c0328 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 24 Sep 2020 00:50:22 +0200 Subject: [PATCH] fix bug causing audio to be cut off too short --- examples/remote.json5 | 1 + index.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/remote.json5 b/examples/remote.json5 index 48cb481..4f8a46b 100644 --- a/examples/remote.json5 +++ b/examples/remote.json5 @@ -1,6 +1,7 @@ { outPath: './remote.mp4', allowRemoteRequests: true, + audioFilePath: './assets/High [NCS Release] - JPB (No Copyright Music)-R8ZRCXy5vhA.m4a', clips: [ { layers: [{ type: 'image', path: 'https://picsum.photos/400/400' }] }, { layers: [{ type: 'image', path: 'https://picsum.photos/200/400' }] }, diff --git a/index.js b/index.js index c844243..43ad0f6 100644 --- a/index.js +++ b/index.js @@ -542,9 +542,10 @@ module.exports = async (config = {}) => { } // End while loop outProcess.stdin.end(); - } finally { + } catch (err) { outProcess.kill(); - + throw err; + } finally { if (verbose) console.log('Cleanup'); if (frameSource1) await frameSource1.close(); if (frameSource2) await frameSource2.close();