🎥 Make videos programmatically with React
fix rendering to a buffer
Jonny Burgercf73d484e97e
diff --git a/packages/renderer/src/stitch-frames-to-video.ts b/packages/renderer/src/stitch-frames-to-video.tsindex d8583b3c72..ad24b3602f 100644--- a/packages/renderer/src/stitch-frames-to-video.ts+++ b/packages/renderer/src/stitch-frames-to-video.ts@@ -512,18 +512,15 @@ const innerStitchFramesToVideo = async (return {task: task.then(() => {assetsInfo.downloadMap.allowCleanup();- cleanDownloadMap(assetsInfo.downloadMap);if (tempFile === null) {+ cleanDownloadMap(assetsInfo.downloadMap);return null;}- return promises- .readFile(tempFile)- .then((file) => {- return Promise.all([file, deleteDirectory(path.dirname(tempFile))]);- })- .then(([file]) => file);+ return promises.readFile(tempFile).finally(() => {+ cleanDownloadMap(assetsInfo.downloadMap);+ });}),getLogs: () => ffmpegOutput,};