Android编译ffmpeg常见错误

2019-01-31  本文已影响0人  JXiaoNiu

1.编译环境
FFmpeg 4.1
NDK android-ndk-r15c

2、错误1少文件

makefile:2: ffbuild/config.mak: no such file or directory

解决方法:
先不要执行make和make install,第一步先在ffmpeg-4.1下执行./configure,该命令会自动生成缺少的文件

3.错误2

../libavutil/libm.h:62: error: static declaration of 'lrint' follows non-static declaration
../libavutil/libm.h:69: error: static declaration of 'lrintf' follows non-static declaration
../libavutil/libm.h:76: error: static declaration of 'round' follows non-static declaration
../libavutil/libm.h:83: error: static declaration of 'roundf' follows non-static declaration
./libavutil/libm.h:90: error: static declaration of 'truncf' follows non-static declaration

解决方法:
config.h搜索lrint、lrintf、round、roundf等对应的字符

#define HAVE_LLRINT 1
#define HAVE_LLRINTF 1
#define HAVE_LRINT 1
#define HAVE_LRINTF 1
#define HAVE_ROUND 1
#define HAVE_ROUNDF 1

将对应的值改为1即可

3.错误3

ffmpeg yasm not found, use --disable-yasm

解决方法:
下载yasm ,重命名为yasm.exe ,放到MinGW\bin 目录下

4.错误4

libavformat/os_support.c: In function 'ff_gai_strerror':
libavformat/os_support.c:194:10: error: 'ERROR_NOT_ENOUGH_MEMORY' undeclared (first use in this function)

解决方法:

打开libavformat/os_support.h 文件,在其中增加 #include <winerror.h>

5.错误5

 [install-libavdevice-static] Error 127
上一篇下一篇

猜你喜欢

热点阅读