ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Abort signal received by worker, but the process continues.

Open
#719 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
17.8k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

PR #573 supposedly adds aborting feature. The message is properly received by the worker as we can see in the image below, but the process continues till completion.

The sample code in the PR is also a bit wrong, as we're supposed to call the `.abort()` in the `AbortController` itself, not the signal. But nonetheless the worker received the signal properly, but no interruption is being done.

Code:
```typescript
const abortController = new AbortController();
const signal = abortController.signal;

const commands = ['-i', 'input.webm', 'output.mp4'];
await ffmpeg.exec(commands, undefined, { signal }).catch(err => {
if (err.name === "AbortError") {
console.log(err.message) // "`Message # ID was aborted`"
}
});

// Later on we call
abortController.abort();
```

![image](https://github.com/ffmpegwasm/ffmpeg.wasm/assets/19264532/ea8b8a47-c68f-455d-9b1d-be700984fe7f)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.