tnfe / FFCreator

A fast video processing library based on node.js (一个基于node.js的高速视频制作库)
http://tnfe.github.io/FFCreator/
MIT License
2.82k stars 399 forks source link

Creator production error. "Cannot read property 'destroy' of undefined" #374

Closed Sunshine-node closed 7 months ago

Sunshine-node commented 1 year ago

想问一下 执行destroy方法提示undefined 我看FFCreator类里面有这个方法

drawcall commented 1 year ago

如何执行的?

Sunshine-node commented 1 year ago

如何执行的?

const creator = new FFCreator({
    cacheDir,
    outputDir,
    output,
    width,
    height,
    debug: false,
    highWaterMark: '3mb'
});

creator.start(); ........ .......... // 会出现Cannot read property 'destroy' of undefined creator.destroy(); 在ts的话 还提示用destory()

LLLLevi-y commented 7 months ago

同样遇到该问题,打印出来destroy是undefined

LLLLevi-y commented 7 months ago

我发现问题了,ts是destory,但是是得调destroy,但是调了之后,整个进程就崩了

drawcall commented 7 months ago
this.renderer.on('error', destroy);
this.renderer.on('complete', destroy);

渲染结束会自动destroy无需手动操作

13rj113 commented 4 months ago

以下是我的代码creator.on('complete', destroy); 好像不行,会报错找不到名称“destroy”

13rj113 commented 4 months ago
this.renderer.on('error', destroy);
this.renderer.on('complete', destroy);

渲染结束会自动destroy无需手动操作

能再详细一些吗