Re: FFMPEG+NDK

138 views
Skip to first unread message

Tim Mensch

unread,
Jun 18, 2012, 4:37:11 AM6/18/12
to andro...@googlegroups.com
On 6/15/2012 7:41 AM, Rui Luís wrote:
> The problem is if i press the back button a couple of times (4 or 5)
> and starting again ffmepg after this 4 or 5 time times that it works
> the application crash


You've checked the logcat output? Be sure to look a few lines before the crash information. Also see if there's an indication in the crash dump where in your code the crash happens.

BUT...given that symptom, the odds are good you're not closing down and releasing memory correctly, so every time you start your app it's allocating more. Android will kill your app without warning if it allocates too much memory.

Just don't ask what "too much" is. It's a bit of a sore point.

Tim

Doug

unread,
Jun 19, 2012, 1:11:06 PM6/19/12
to andro...@googlegroups.com
If you are doing ffmpeg processing on the main thread, well, don't do that.  Make sure you are threading appropriately for Android applications and observing the android activity lifecycle.  It doesn't matter if you are using the NDK or not.

Doug

On Friday, June 15, 2012 6:41:57 AM UTC-7, Rui Luís wrote:
Good day.
I am trying to use ffmpeg in android through the NDK. I can make it work. i can see a live stream in my android phone. The problem is if i press the back button a couple of times (4 or 5) and starting again ffmepg after this 4 or 5 time times that it works the application crash (the activity calling the ffmpeg NDK) without any kind of error or indication of error. it simply call the oncreate of the activity. The problem is that i already run all the debugging case i could imagine. i clean all the memory that i create. Does any one pass by the same issue?

thanks.
Reply all
Reply to author
Forward
0 new messages