Skip to content

Commit

Permalink
build: ffmpeg 6.0 support (#3812)
Browse files Browse the repository at this point in the history
It seems to work fine with the new 6.0 with no code modifications, other
than our cmake build misidentifying the version.
  • Loading branch information
lgritz authored Apr 22, 2023
1 parent eb2ceba commit 54badee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
ACES support and much better recognition of camera metadata; if
building with C++17 or higher, LibRaw >= 0.20 is necessary)
* If you want support for a wide variety of video formats:
* ffmpeg >= 3.0 (tested through 5.1)
* ffmpeg >= 3.0 (tested through 6.0)
* If you want support for jpeg 2000 images:
* OpenJpeg >= 2.0 (tested through 2.5; we recommend 2.4 or higher
for multithreading support)
Expand Down
6 changes: 4 additions & 2 deletions src/cmake/modules/FindFFmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ if (FFMPEG_INCLUDES)
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MAJOR "${TMP}")
file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
REGEX "^#define LIBAVCODEC_VERSION_MINOR .*$")
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MINOR "${TMP}")
string (REGEX MATCHALL "[0-9]+[.]?[0-9]*" LIBAVCODEC_VERSION_MINOR "${TMP}")
file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
REGEX "^#define LIBAVCODEC_VERSION_MICRO .*$")
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MICRO "${TMP}")
set (LIBAVCODEC_VERSION "${LIBAVCODEC_VERSION_MAJOR}.${LIBAVCODEC_VERSION_MINOR}.${LIBAVCODEC_VERSION_MICRO}")
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.37.100)
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 60.3.100)
set (FFMPEG_VERSION 6.0)
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.37.100)
set (FFMPEG_VERSION 5.1)
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.18.100)
set (FFMPEG_VERSION 5.0)
Expand Down

0 comments on commit 54badee

Please sign in to comment.