@remotion/renderer 4.0.0-spawn.14 → 4.0.0-spawn.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/render-media.js +6 -0
- package/package.json +3 -3
package/dist/render-media.js
CHANGED
|
@@ -54,10 +54,12 @@ const innerRenderMedia = async ({ parallelism, proResProfile, crf, composition,
|
|
|
54
54
|
let renderedFrames = 0;
|
|
55
55
|
let renderedDoneIn = null;
|
|
56
56
|
let encodedDoneIn = null;
|
|
57
|
+
let cancelled = false;
|
|
57
58
|
let cancelRenderFrames = () => undefined;
|
|
58
59
|
rejectIfCancel
|
|
59
60
|
.then(() => undefined)
|
|
60
61
|
.catch((err) => {
|
|
62
|
+
cancelled = true;
|
|
61
63
|
preStitcher === null || preStitcher === void 0 ? void 0 : preStitcher.task.kill();
|
|
62
64
|
cancelRenderFrames();
|
|
63
65
|
throw err;
|
|
@@ -133,6 +135,9 @@ const innerRenderMedia = async ({ parallelism, proResProfile, crf, composition,
|
|
|
133
135
|
? async (buffer, frame) => {
|
|
134
136
|
var _a;
|
|
135
137
|
await waitForRightTimeOfFrameToBeInserted(frame);
|
|
138
|
+
if (cancelled) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
136
141
|
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.write(buffer);
|
|
137
142
|
setFrameToStitch(frame + 1);
|
|
138
143
|
}
|
|
@@ -200,6 +205,7 @@ const innerRenderMedia = async ({ parallelism, proResProfile, crf, composition,
|
|
|
200
205
|
* When an error is thrown in renderFrames(...) (e.g., when delayRender() is used incorrectly), fs.unlinkSync(...) throws an error that the file is locked because ffmpeg is still running, and renderMedia returns it.
|
|
201
206
|
* Therefore we first kill the FFMPEG process before deleting the file
|
|
202
207
|
*/
|
|
208
|
+
cancelled = true;
|
|
203
209
|
cancelRenderFrames();
|
|
204
210
|
if (stitcherFfmpeg !== undefined && stitcherFfmpeg.exitCode === null) {
|
|
205
211
|
const promise = new Promise((resolve) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.0-spawn.
|
|
3
|
+
"version": "4.0.0-spawn.15+87508e2d3",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"execa": "5.1.1",
|
|
24
24
|
"puppeteer-core": "13.5.1",
|
|
25
|
-
"remotion": "4.0.0-spawn.
|
|
25
|
+
"remotion": "4.0.0-spawn.15+87508e2d3",
|
|
26
26
|
"serve-handler": "6.1.3",
|
|
27
27
|
"source-map": "^0.8.0-beta.0"
|
|
28
28
|
},
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "87508e2d3155ca3f7804ede63ea9b82bd2b3749f"
|
|
63
63
|
}
|