[FFmpeg-user] libstagefright_h264 SIGSEGV error

grid at rusvision.com grid at rusvision.com
Tue Feb 14 20:25:31 CET 2012


 Hello all,
  I am trying to decode h264 file to YUV on Android 2.3+. As I understand
I need to communicate with Stagefright, as it`s the only way now, after
closing access to OpenMAX IL implementations (OpenCore).

My hardware: Beagleboard-Xm + TI Android 2.3 (official)

I have used FFmpeg 0.10 (and tried 0.9/0.9.1..) for this issue, compiled
it with NDK7 (and also tried NDK6b with the same result):
----------------------------------------------------
ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 28 2012 14:42:37 with gcc 4.4.3
  configuration: --target-os=linux --cross-prefix=arm-linux-androideabi-
--arch=arm --cpu=armv7-a
--sysroot=/home/grid/Android/Android_NDK/platforms/android-9/arch-arm
--disable-avdevice --disable-decoder=h264 --disable-decoder=h264_vdpau
--enable-libstagefright-h264 --prefix=build/stagefright/armeabi-v7a
--extra-cflags='-Iandroid-source/frameworks/base/include
-Iandroid-source/system/core/include
-Iandroid-source/frameworks/base/media/libstagefright
-Iandroid-source/frameworks/base/include/media/stagefright/openmax
-I/home/grid/Android/Android_NDK/sources/cxx-stl/system/include
-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
--extra-ldflags='-Wl,--fix-cortex-a8 -Landroid-libs
-Wl,-rpath-link,android-libs' --extra-cxxflags='-Wno-multichar
-fno-exceptions -fno-rtti'
  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
outfile}...
----------------------------------------------------

Test Case 1:
So, entering next command give give me error with 480p:
ffmpeg -i /sdcard/Video/480p.mp4
>> Stopped (signal) ffmpeg -i /sdcard/Video/480p.mp4
Full Android "answer" from ADB Logcat: [1] http://pastebin.com/76JLgtXX
While debugging I found that SIGSERV is situated in line
(libavcodec/libstagefright.cpp):
>>    av_image_copy(s->ret_frame.data, s->ret_frame.linesize,
>>                  src_data, src_linesize,
>>                  avctx->pix_fmt, avctx->width, avctx->height);


Test Case 2:
 Additionally I found that on some bigger files (720p) Android answers next:
[libstagefright_h264 @ 0xd479b0] Decode failed: 80000000


 Android-developers, does anybody know what this error means and how to
deal with it? I tried to make DSP window bigger, but with no luck.
Commands like "stagefright /sdcard/Video/480p.mp4" works fine. I have
these errors also on Android 4.0 and on another hardware (Toshiba Folio).
 If anybody has positive experience with FFmpeg + Stagefright - please let
me know.


More information about the ffmpeg-user mailing list