Android video trimming via ffmpeg

后端 未结 4 763
半阙折子戏
半阙折子戏 2020-12-16 05:46

I have downloaded video trimming code from github from this link.

It’s working perfectly for the first time, but when I try to run it for the second time the code cr

4条回答
  •  一生所求
    2020-12-16 06:08

    https://lists.ffmpeg.org/pipermail/libav-user/2012-May/001964.html

    Calling native method twice of third party library in an Activity causes the Android application to close down

    read about the issue with static vars in 'ffmpeg.c' ...

    I would bet that u have the same problem and need to do something (3 alternate choices) to reset or GC those vars:

    1. get the java classloader that loaded the lib and GC it

    2. in the c-layer do what the OP did in above link

    3. write a 2nd shared lib that uses 'dlsym' and 'dlclose' on the first library during each call cycle

    github , see the 'README' here

    same issue that u r having

提交回复
热议问题