android studio NDK编译ffmpeg此问题为交叉编译问题

Error:error: undefined reference to 'av_bitstream_filter_filter'
Error:error: undefined reference to 'avpriv_codec2_mode_bit_rate'
Error:error: undefined reference to 'avpriv_codec2_mode_frame_size'
Error:error: undefined reference to 'avpriv_codec2_mode_block_align'
Error:error: undefined reference to 'av_adts_header_parse'
Error:error: linker command failed with exit code 1 (use -v to see invocation)

这个是因为连接的静态库之间有依赖,所以连接时有先后顺序。如我的CMakeLists.text中如下写,就会出现上述错误

需要添加以下库:
                       z
                        OpenSLES
                        android
                      

target_link_libraries(
                       dnplayer
                       avfilter
                       avformat
                       avcodec
                       avutil
                       swresample
                       swscale
                      # ffmpeg
                       z
                        OpenSLES
                        android
                       log )

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值