Skip to content

Commit

Permalink
fr fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dextinfire committed Dec 14, 2024
1 parent f044120 commit 61bbd42
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ if (NOT DEFINED IMPACTO_DISABLE_FFMPEG)
)

if (NOT VCPKG_TOOLCHAIN)
set(AVCPP_PATCH git apply ${CMAKE_CURRENT_SOURCE_DIR}/avcpp.patch)
set(AVCPP_PATCH git apply ${CMAKE_CURRENT_SOURCE_DIR}/vendor/avcpp.patch)
FetchContent_Declare(
avcpp
GIT_REPOSITORY "https://github.com/h4tr3d/avcpp"
Expand Down
25 changes: 23 additions & 2 deletions avcpp.patch → vendor/avcpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ index 732a4b2..d4a4ee1 100644

add_subdirectory(src)

diff --git a/catch2 b/catch2
deleted file mode 160000
index c4e3767..0000000
--- a/catch2
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c4e3767e265808590986d5db6ca1b5532a7f3d13
diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake
index 2746b39..91c9b56 100644
--- a/cmake/FindFFmpeg.cmake
Expand All @@ -23,15 +30,29 @@ index 2746b39..91c9b56 100644
find_component(AVUTIL libavutil avutil libavutil/avutil.h)
find_component(AVFILTER libavfilter avfilter libavfilter/avfilter.h)
find_component(SWSCALE libswscale swscale libswscale/swscale.h)
diff --git a/src/avutils.cpp b/src/avutils.cpp
index 6b7aa96..4a05be3 100644
--- a/src/avutils.cpp
+++ b/src/avutils.cpp
@@ -177,7 +177,7 @@ void init()
#if LIBAVFILTER_VERSION_MAJOR < 7 // FFmpeg 4.0
avfilter_register_all();
#endif
- avdevice_register_all();
+ // avdevice_register_all();

#if LIBAVCODEC_VERSION_MAJOR < 58 // FFmpeg 4.0
av_lockmgr_register(avcpp_lockmgr_cb);
diff --git a/src/ffmpeg.h b/src/ffmpeg.h
index 397204f..1bb9d10 100644
index 397204f..f0afb22 100644
--- a/src/ffmpeg.h
+++ b/src/ffmpeg.h
@@ -9,7 +9,6 @@ extern "C"
@@ -9,7 +9,7 @@ extern "C"
#include <libavutil/mathematics.h>
#include <libavutil/opt.h>
#include <libavutil/pixdesc.h>
-#include <libavdevice/avdevice.h>
+#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libswresample/swresample.h>
#include <libavformat/version.h>

0 comments on commit 61bbd42

Please sign in to comment.