While somewhat rude, a potential workaround might be to use / link to ffmpeg from the Service (you should still do this), which is declared in the manifest to run in its own process, and not in the clientโs actions. Then complete this process itself - if necessary, call native exit () when the task is fully completed. Android doesn't particularly like this happening - this is not good practice, but you can probably make it work.
Reconstructing the library in order to be able to reset directly in the new state (or even make it completely contextual) would be better, but for a huge old code base, a large project may turn out to be.
Chris stratton
source share