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

Memory leak fixes and proper killing of processes #214

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

diegoperini
Copy link

I managed to fix some of the common issues on my fork, leaking Context and non working kill command to be specific.

Steps to install if this doesn't get merged:

  1. Edit your project's build.gradle (not app) like this. (important line is jitpack)
allprojects {
    repositories {
        jcenter()
        mavenCentral()

        ...

        maven {
            url 'https://jitpack.io'
        }
    }
}
  1. Add below line to your app's build.gradle dependencies.

compile 'com.github.diegoperini:ffmpeg-android-java:v0.4.6'

Link for the fork: https://github.com/diegoperini/ffmpeg-android-java

Changelog:

  1. Added whenFFmpegIsReady() to properly wait for ffmpeg state.
  2. Fixed killRunningProcesses() to properly kill the execution.
  3. Added a FFmpeg.getInstance() overload to work with a ContextProvider instead of a context. It is a fix for a common memory leak caused by storing the context internally. Old factory method is still supported but marked as deprecated.

@pedromalta
Copy link

nice :)

@pedromalta
Copy link

How do you instantiate correctly the ffmpeg(FFmpeg.getInstance())?

@diegoperini
Copy link
Author

#107 (comment)

Here is the example.

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

Successfully merging this pull request may close these issues.

2 participants