Skip to content

🎥 Make videos programmatically with React

Update compose.ts

Jonny Burger1af5a9390589
diff --git a/packages/renderer/src/compositor/compose.ts b/packages/renderer/src/compositor/compose.ts
index 6485de00cf..4b90cd1756 100644
--- a/packages/renderer/src/compositor/compose.ts
+++ b/packages/renderer/src/compositor/compose.ts
@@ -125,6 +125,16 @@ export const callCompositor = (payload: string) => {
}
});
+ if (child.stdin.closed) {
+ reject(
+ new Error(
+ 'Compositor stdin closed unexpectedly,' +
+ Buffer.concat(stderrChunks).toString('utf-8')
+ )
+ );
+ return;
+ }
+
child.stdin.write(payload);
child.stdin.end();
});