Skip to content

Commit

Permalink
CMake: Handle indeterminate FFMpeg HWAccel status
Browse files Browse the repository at this point in the history
If we don't have a version number and can't conclusively determine
whether hwaccel is available, but the user hasn't disabled it
explicitly, just don't report its status at all. Better than
reporting it's disabled when that may not be true at all.
  • Loading branch information
ferdnyc committed Jun 6, 2021
1 parent 6a373ef commit 9c9f5c8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/CMakeLists.txt
Expand Up @@ -327,11 +327,17 @@ endif()
# Include in feature summary
if(USE_HW_ACCEL AND HAVE_HW_ACCEL)
set(FFMPEG_HARDWARE_ACCELERATION TRUE)
elseif(USE_HW_ACCEL)
set(FFMPEG_HARDWARE_ACCELERATION "NOTFOUND")
else()
set(FFMPEG_HARDWARE_ACCELERATION FALSE)
endif()
set(_hwaccel_help "GPU-accelerated routines (FFmpeg 3.4+)")
add_feature_info("FFmpeg hwaccel" FFMPEG_HARDWARE_ACCELERATION ${_hwaccel_help})

# Report HWAccel status, unless it's indeterminate
if (NOT FFMPEG_HARDWARE_ACCELERATION STREQUAL "NOTFOUND")
set(_hwaccel_help "GPU-accelerated routines (FFmpeg 3.4+)")
add_feature_info("FFmpeg hwaccel" FFMPEG_HARDWARE_ACCELERATION ${_hwaccel_help})
endif()

################### OPENMP #####################
# Check for OpenMP (used for multi-core processing)
Expand Down

0 comments on commit 9c9f5c8

Please sign in to comment.