I compile the FFmpeg under the armv5, it can work well on Android NDK r5, but I compile the FFmpeg under the armv6, it can success, but when I call the function av_new_stream, it is crashed, and it is crashed on the libavutil.c/rational.c:

if(num<=max && den<=max){
    a1= (AVRational){num, den};
    den=0;
}

Dose anyone encounter this problem?

The LOCAL_FLAGS
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE    := ffmpeg
LOCAL_CFLAGS := -DHAVE_AV_CONFIG_H  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC  -std=gnu99 -march=armv6

Is there something error here?

有帮助吗?

解决方案

If you are running your code under the emulator, this is perfectly normal. The emulator only supports ARMv5. Not ARMv6 and certainly not ARMv7.

Update: This is not true anymore with the newer versions of the emulator. It fully supports ARMv7.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top