UNPKG

@ffmpeg/ffmpeg

Version:
10 lines (9 loc) 344 B
module.exports = (Core, args) => { const argsPtr = Core._malloc(args.length * Uint32Array.BYTES_PER_ELEMENT); args.forEach((s, idx) => { const buf = Core._malloc(s.length + 1); Core.writeAsciiToMemory(s, buf); Core.setValue(argsPtr + (Uint32Array.BYTES_PER_ELEMENT * idx), buf, 'i32'); }); return [args.length, argsPtr]; };