-
Notifications
You must be signed in to change notification settings - Fork 11
Description
我用build_ffmpeg-emcc.sh脚本编译ffmpeg-3.4.8源代码,然后使用生成的a文件编译capture.c,发现报以下错误:
···
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_alloc
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_free
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_is_initialized
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_convert
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_close
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_is_initialized
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_init
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_convert
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_convert
wasm-ld: error: ./lib/ffmpeg-emcc/lib/libavcodec.a(opusdec.o): undefined symbol: swr_close
···
如果在emcc命令加上参数./lib/ffmpeg-emcc/lib/libswresample.a,则可以编译成功,但是生成后的wasm文件有13M,而不是4M,而且,为什么你的github代码库中没有libswresample.a这个文件?
BTW,的确,使用你的github代码库中a文件编译capture.c,生成的wasm文件是4M。