[FFmpeg-devel] [PATCH] use bcrypt instead of the old wincrypt API

Hendrik Leppkes h.leppkes at gmail.com
Fri Mar 30 13:42:28 EEST 2018


On Fri, Mar 30, 2018 at 9:23 AM, Steve Lhomme <robux4 at ycbcr.xyz> wrote:
> When targeting Windows Vista and above
> The wincrypt API is deprecated and not allowed for Windows Store apps.
> ---
>  configure               |  4 +++-
>  libavutil/random_seed.c | 16 ++++++++++++++--
>  2 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 99570a1415..6d34728b83 100755
> --- a/configure
> +++ b/configure
> @@ -2144,6 +2144,7 @@ SYSTEM_LIBRARIES="
>      vaapi_drm
>      vaapi_x11
>      vdpau_x11
> +    bcrypt
>      wincrypt
>  "
>
> @@ -3442,7 +3443,7 @@ avformat_deps="avcodec avutil"
>  avformat_suggest="libm network zlib"
>  avresample_deps="avutil"
>  avresample_suggest="libm"
> -avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi videotoolbox corefoundation corevideo coremedia wincrypt"
> +avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi videotoolbox corefoundation corevideo coremedia bcrypt wincrypt"
>  postproc_deps="avutil gpl"
>  postproc_suggest="libm"
>  swresample_deps="avutil"
> @@ -5827,6 +5828,7 @@ check_lib ole32    "windows.h"            CoTaskMemFree        -lole32
>  check_lib shell32  "windows.h shellapi.h" CommandLineToArgvW   -lshell32
>  check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom       -ladvapi32
>  check_lib psapi    "windows.h psapi.h"    GetProcessMemoryInfo -lpsapi
> +check_cpp_condition windows.h "_WIN32_WINNT >= 0x0600" && check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom  -lbcrypt
>

FFmpeg does not support building for XP anymore, so you can skip that condition.

- Hendrik


More information about the ffmpeg-devel mailing list