ffmpeg.wasm
ffmpeg.wasm copied to clipboard
fix: Cancel run promise if the exit() is called
The .run()
promise will never be resolved if exit
is called.
This PR will reject the run
promise if is running:
const longRun = ffmpeg.run([/*args*/])
setTimeout(()=> {
ffmpeg.exit()
}, timeout)
try{
await longRun(); // before everything after this will never run
} catch {
// handle error
}
console.log('continue doing work')
this PR needs to be merged ASAP. this bug really annoys me cause it breaks promise mechanism.
Thank you @pikax
Thanks for the PR!