Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy FFMPEG WASM workers when the dispose lifecycle event happens #736

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicolo-kira
Copy link
Contributor

In our local application we noticed that if you run the ffmpeg-wasm convert engine multiple times in a row, even after calling the VideoJS dispose function, the plugin loads the ffmpeg workers into the browser on every conversion. This caused a memory leak and eventual crash in our application, as the number of workers trying to run kept growing and growing

I've added a dispose hook in the convert engine similar to the record engine, which would be called when the player is disposed of, and cleans up the ffmpeg workers to avoid the memory leak.

@coveralls
Copy link

Coverage Status

coverage: 71.353% (-0.09%) from 71.445%
when pulling b5d97e4 on kira:fix-ffmpeg-wasm-leak
into 1285cec on collab-project:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants