-
Notifications
You must be signed in to change notification settings - Fork 832
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 #107
Comments
+1, I'm scratching my head trying to fix this issue and would love to be able to use .AAR as it's the simplest way to add ffmpeg to the project. Another issue, |
The easiest way to do this is to edit the source code and build a new .AAR file, you will have to build one anyway because of #79. So for me I add this function in public void releaseContext(){
context = null;
} Or better yet, just remove the singleton. |
+1, Hi, did someone already create a fork where killRunningProcesses and the memory leak was fixed? |
I managed to fix the issue on my fork. Shameful self promotion here. :) Steps to install:
Link for the fork: https://github.com/diegoperini/ffmpeg-android-java Changelog:
|
@diegoperini , are you planning to maintain the code, it is really useful , no need to build another AAR of our own, it would be useful for others , there is a preblem with isFFmpegCommandRunning() alos they need to change it from return ffmpegExecuteAsyncTask != null && !ffmpegExecuteAsyncTask.isProcessCompleted(); to return ffmpegExecuteAsyncTask != null || !ffmpegExecuteAsyncTask.isProcessCompleted(); |
@pawaom , I am okay to commit bug fixes every now and then but to be honest, there are technical things I don't think I'm proficient enough such as,
Now these are mentioned, your suggestion is easy to apply. You can try and test it with my fork. I also updated the README on my fork. Steps to install from scratchEdit your project's build.gradle (not app) like this. (important line is jitpack)
Add below line to your app's build.gradle dependencies.
|
@diegoperini , thanks for the reply, can you ask others to collaborate with you, can any one else help @diegoperini , to maintain the code, this code (writing minds) seems to be abandoned, no updates in the gradle, no one replays any thing @diegoperini , have you solved the memory leak issue, as well , please keep this code on Github, i really dont know how to build an .AAR , can some one explain that process for us |
The leak is solved @pawaom . Construct Example:
|
Could you please fix the memory leak for this wrapper?
The issue is the FFMPEG class is the singleton and contains the Context as member field. Application context is used as this context and makes app live till lifecycle of the application. Once initialized ffmpeg lib is keep in memory forever.
I would like to have an option to release the memory allocated for it. The good option from my point of view is to add a public method, e.g. onDispose() where context will be set in null.
The text was updated successfully, but these errors were encountered: