ijkplayer iOS编译问题之[-Wincompatible-function-pointer-types]

server/2024/11/24 12:06:02/

编译环境 Apple M1 Pro Sonoma 14.1.2
编译的时候出现如下报错:

libavcodec/aarch64/h264dsp_init_aarch64.c:84:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16_neon;^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:85:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_8_neon;^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:86:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_4_neon;^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:88:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16_neon;^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:89:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_8_neon;^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:90:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_4_neon;^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
make: *** [libavcodec/aarch64/h264dsp_init_aarch64.o] Error 1
make: *** Waiting for unfinished jobs....

搜了搜好像没找到相关编译问题的,但是还需要用这个东西,只能再研究一下日志了,发现每个错误都有一个 [-Wincompatible-function-pointer-types],感觉好像就跟这个有关系了,然后搜了搜尝试修改一下解决了问题。

修改方法如下

找到do-compile-ffmpeg.sh 这个文件

FFMPEG_CFLAGS=
FFMPEG_CFLAGS="$FFMPEG_CFLAGS -arch $FF_ARCH"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCRUN_OSVERSION"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FFMPEG_EXTRA_CFLAGS"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCODE_BITCODE"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS -Wno-error=incompatible-function-pointer-types" # 加上这个就能编译过了

接下来就没问题了。


http://www.ppmy.cn/server/20850.html

相关文章

计算机网络知识点

层次模型 IQS七层模型 TCP/IP 原理体系结构 应用层 应用层 应用层 表示层 运输层 运输层 会话层 网际层 网络层 运输层 网络接口层 数…

Linux 下一些简单配置和软件安装

零、前言 以 VAR 开头的表示用户可配置的变量 以 CONST 开头的表示涉及到的系统常量,例如某个特定文件的地址路径。一般不可变,但是不排除因版本不同需要进行修改。 出现 PATH 表示这是一个路径信息 一、配置 1.1、更换 yum 源 PATH_YUM_CONF"…

区块链与金融科技

前言 人类与元宇宙之间就差一个区块链,一本书读懂区块链与金融:从根源细致剖析区块链原理,以金融视角洞察区块链技术,在数字化转型中落地区块链。 卖点 由表及里:从货币变迁到加密技术,从根源细致剖析区…

FebHost:顶级域名、通用域名、国别域名注册介绍

在创建网站时,选择适当的顶级域名是至关重要的。顶级域名不仅有助于传播产品信息,还能提高受众的信任度和参与度,进而改善品牌记忆。 顶级域名有各种类型,每种都有其特定用途。最常见的两种顶级域是通用顶级域(gTLD&a…

【ZZULIOJ】1084: 计算两点间的距离(多实例测试)(Java)

目录 题目描述 输入 输出 样例输入 Copy 样例输出 Copy code 题目描述 输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。 输入 输入数据有多组,每组占一行,由4个实数组成,分别表…

ASP.NET Core WEB API 使用element-ui文件上传组件el-upload执行手动文件文件,并在文件上传后清空文件

前言: 从开始学习Vue到使用element-ui-admin已经有将近快两年的时间了,在之前的开发中使用element-ui上传组件el-upload都是直接使用文件选取后立即选择上传,今天刚好做了一个和之前类似的文件选择上传的需求,不过这次是需要手动点…

数据分析:筛选多组交集特征

介绍 有时候需要在多个组间筛选它们的交集特征&#xff0c;本文利用R语言实现该目的 加载R包 library(UpSetR) library(tidyverse)Upset画图 movies <- read.csv(system.file("extdata", "movies.csv", package "UpSetR"), header T, s…

【简单介绍下机器学习之sklearn基础】

&#x1f3a5;博主&#xff1a;程序员不想YY啊 &#x1f4ab;CSDN优质创作者&#xff0c;CSDN实力新星&#xff0c;CSDN博客专家 &#x1f917;点赞&#x1f388;收藏⭐再看&#x1f4ab;养成习惯 ✨希望本文对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提出…