GStreamer-java and x264enc crashes app with SIGSEGV on Android

Arun Raghavan arun.raghavan at collabora.co.uk
Thu Jul 12 07:10:25 PDT 2012


On Thu, 2012-07-12 at 16:03 +0200, Marko Matić wrote:
> I am trying to play around with GStreamer-java and it's h.264 encoder
> (x264enc) on Android. 
> 
> 
> Now, I tried to encode raw video from test video source (set its
> is-live property to TRUE), and when data starts flowing into the
> x264enc Element, I get SIGSEGV in libx264.so and my app crashes. And
> it looks like code is dereferencing a NULL... Exact error location is
> in file "gstreamer_ndk_bundle/x264/encoder/analyse.c" line 963. And it
> is this line:
> 
> 
>     h->mc.memcpy_aligned( h->mb.pic.i8x8_dct_buf, h->dct.luma8x8,
> sizeof(h->mb.pic.i8x8_dct_buf) );
> 
> 
> My device's CPU is Cortex 8 and it has NEON feature... 
> 
> 
> I tried to printout to a file all `h` structure fields, and no field
> is uninitialized.
> 
> 
> 
> 
> My questions:
> 1. How can I know what is throwing SIGSEGV, because this line of code
> seems to be ok? 
> 2. Is this a known bug or an expected behavior of x264 encoder on ARM
> CPU or I am missing some encoder configuration?
> 3. I noticed that if I set property analyse of the encoder to
> 0x3:0x113 (some random value I found online) I don't get SIGSEGV,
> encoder seems to work, but I get error in pipeline: Data flow error.
> Can I just set analyse to a meaningful value?

I've seen this bug, and I believe it's NEON-related. I haven't had time
to actually root-cause it. Quick hack fix: force disabling of the NEON
code. Longer fix: figure out why it's failing.

Regards,
Arun




More information about the gstreamer-android mailing list