Skip to content

Commit

Permalink
Merge pull request #15 from daschuer/faad2
Browse files Browse the repository at this point in the history
Faad2 + CMake
  • Loading branch information
uklotzde authored Jun 10, 2020
2 parents b442828 + 5b2fcda commit c775f33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,14 @@ endif()
# FAAD AAC audio file decoder plugin
find_package(MP4)
find_package(MP4v2)
option(FAAD "FAAD AAC audio file decoder support" OFF)
# It is enabled by default on Linux only, because other targets have other solutions.
# Used FAAD_DEFAULT because the complex expression is not supported by cmake_dependent_option()
if(UNIX AND NOT APPLE AND (MP4_FOUND OR MP4v2_FOUND))
set(FAAD_DEFAULT TRUE)
else()
set(FAAD_DEFAULT FALSE)
endif()
cmake_dependent_option(FAAD "FAAD AAC audio file decoder support" ON "FAAD_DEFAULT" OFF)
if(FAAD)
if(NOT MP4_FOUND AND NOT MP4v2_FOUND)
message(FATAL_ERROR "FAAD AAC audio support requires libmp4 or libmp4v2 with development headers.")
Expand Down
5 changes: 2 additions & 3 deletions src/sources/libfaadloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ LibLoader::LibLoader()
!m_neAACDecClose ||
!m_neAACDecPostSeekReset ||
!m_neAACDecDecode2 ||
!m_neAACDecGetErrorMessage ||
!m_neAACDecGetVersion) {
!m_neAACDecGetErrorMessage) {
kLogger.warning() << "NeAACDecOpen:" << m_neAACDecOpen;
kLogger.warning() << "NeAACDecGetCurrentConfiguration:" << m_neAACDecGetCurrentConfiguration;
kLogger.warning() << "NeAACDecSetConfiguration:" << m_neAACDecSetConfiguration;
Expand All @@ -97,7 +96,7 @@ LibLoader::LibLoader()
kLogger.warning() << "NeAACDecPostSeekReset:" << m_neAACDecPostSeekReset;
kLogger.warning() << "NeAACDecDecode2:" << m_neAACDecDecode2;
kLogger.warning() << "NeAACDecGetErrorMessage:" << m_neAACDecGetErrorMessage;
kLogger.warning() << "NeAACDecGetVersion:" << m_neAACDecGetVersion;
kLogger.warning() << "NeAACDecGetVersion:" << m_neAACDecGetVersion; // From FAAD 2.8.2
m_neAACDecOpen = nullptr;
m_neAACDecGetCurrentConfiguration = nullptr;
m_neAACDecSetConfiguration = nullptr;
Expand Down

0 comments on commit c775f33

Please sign in to comment.