Open whhwhhwhh opened 7 months ago
请大佬帮忙看一下,这是我的电脑环境没配对,还是需要手动改一下指针类型?
找到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" # 加上这个就能编译过了
我试了一下是可以的
找到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" # 加上这个就能编译过了
我加了之后,也没有用,还是报错。
To add on, after adding -Wno-error=incompatible-function-pointer-types
, I also faced some more errors related to int-conversion
.
So you might also want to add -Wno-int-conversion
:
FFMPEG_CFLAGS="$FFMPEG_CFLAGS -Wno-error=incompatible-function-pointer-types -Wno-int-conversion"
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" # 加上这个就能编译过了 FFMPEG_LDFLAGS="$FFMPEG_CFLAGS" FFMPEG_DEP_LIBS=
这样改就可,我试过了
-Wno-error= 改成这个就好了 FFMPEG_CFLAGS="$FFMPEG_CFLAGS -Wno-incompatible-function-pointer-types"
CC libavcodec/aarch64/h264dsp_init_aarch64.o
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.