Skip to content

Commit

Permalink
build: Add proper detection of new FFmpeg versions (#4394)
Browse files Browse the repository at this point in the history
Correctly detect new versions of FFmpeg (6.1 and 7.0). The FFmpeg versions page
was used for reference:
https://www.ffmpeg.org/download.html#releases

Signed-off-by: Darby Johnston <[email protected]>
  • Loading branch information
darbyjohnston authored Aug 27, 2024
1 parent 8699b96 commit fb5f2bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cmake/modules/FindFFmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ if (FFMPEG_INCLUDES)
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 60.3.100)
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 61.3.100)
set (FFMPEG_VERSION 7.0)
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 60.31.102)
set (FFMPEG_VERSION 6.1)
elseif (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)
Expand Down

0 comments on commit fb5f2bf

Please sign in to comment.