Skip to content

Commit

Permalink
Prevent FFMPEG build warning from causing compilation error
Browse files Browse the repository at this point in the history
The specific error was
```
/Users/runner/work/etterna/etterna/main/build/ffmpeg_dl/ffmpeg-2.1.3-src/libavcodec/flvenc.c:96:23: error: incompatible function pointer types initializing 'int (*)(AVCodecContext *, AVPacket *, const AVFrame *, int *)' (aka 'int (*)(struct AVCodecContext *, struct AVPacket *, const struct AVFrame *, int *)') with an expression of type 'int (AVCodecContext *, AVPacket *, AVFrame *, int *)' (aka 'int (struct AVCodecContext *, struct AVPacket *, struct AVFrame *, int *)') [-Wincompatible-function-pointer-types]
    .encode2        = ff_MPV_encode_picture,
                      ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [libavcodec/flvenc.o] Error 1
```

when trying to build for aarch64 on the Sonoma Github M1 runner

I believe this ffmpeg warning was likely fixed a long, long time
 ago; we're running an ancient version right now.
  • Loading branch information
bluebandit21 committed Jul 30, 2024
1 parent 01248d6 commit 57ceae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMake/Helpers/SetupFFMPEG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if(APPLE)
endif()
endif()
list(APPEND FFMPEG_CONFIGURE "--enable-gpl")
list(APPEND FFMPEG_CONFIGURE "--extra-cflags=-mmacosx-version-min=10.8 -w")
list(APPEND FFMPEG_CONFIGURE "--extra-cflags=-mmacosx-version-min=10.8 -w -Wno-error=incompatible-function-pointer-types")

list(APPEND FFMPEG_BUILD_LIBS
"${FFMPEG_BIN}/libavformat/libavformat.a"
Expand Down

0 comments on commit 57ceae6

Please sign in to comment.