fix: clone object

This commit is contained in:
手瓜一十雪 committed 2025-01-27 19:53:03 +08:00
1 parent 59861337b6
commit 7020fbb2ad
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -30,11 +30,11 @@ export class FFmpegService {
await piscina.destroy();
}
public static async convert(filePath: string, pcmPath: string, logger: LogWrapper): Promise<Buffer> {
public static async convert(filePath: string, pcmPath: string): Promise<Buffer> {
const piscina = new Piscina<EncodeArgs, EncodeResult>({
filename: await getWorkerPath(),
});
const result = await piscina.run({ method: 'convert', args: [filePath, pcmPath, logger] });
const result = await piscina.run({ method: 'convert', args: [filePath, pcmPath] });
await piscina.destroy();
return result;
}