mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibMedia: Use build-time rather than configure-time check for avcodec
Rather than checking the avcodec version in CMake, check it using the avcodec version macros in the only source file that needs to know about the AVFrame API/ABI change in version 59.24.100. This is friendlier to other build systems that would rather avoid configure time checks.
This commit is contained in:
parent
157d41bb0d
commit
994457d7af
Notes:
github-actions[bot]
2024-09-27 10:46:24 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/994457d7af4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1544
2 changed files with 4 additions and 3 deletions
|
@ -7,7 +7,4 @@ pkg_check_modules(AVFORMAT IMPORTED_TARGET libavformat)
|
|||
if (AVCODEC_FOUND AND AVFORMAT_FOUND)
|
||||
set(HAS_FFMPEG ON CACHE BOOL "" FORCE)
|
||||
add_compile_definitions(USE_FFMPEG=1)
|
||||
if (AVCODEC_VERSION VERSION_GREATER_EQUAL "59.24.100")
|
||||
add_compile_definitions(USE_FFMPEG_CH_LAYOUT=1)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
#include <AK/ScopeGuard.h>
|
||||
#include <LibCore/System.h>
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 24, 100)
|
||||
# define USE_FFMPEG_CH_LAYOUT
|
||||
#endif
|
||||
|
||||
namespace Audio {
|
||||
|
||||
OggLoaderPlugin::OggLoaderPlugin(NonnullOwnPtr<SeekableStream> stream)
|
||||
|
|
Loading…
Reference in a new issue