On 8/29/2016 3:49 AM, Matt Oliver wrote: > From 7c70764508643c45b037f1ed9d77a95c24b05f6e Mon Sep 17 00:00:00 2001 > From: Matt Oliver <protogo...@gmail.com> > Date: Mon, 29 Aug 2016 16:46:10 +1000 > Subject: [PATCH 2/2] Modify existing dll loading to use new safe dlopen. > > --- > libavcodec/nvenc.c | 9 ++------- > libavformat/avisynth.c | 13 ++++--------- > libavutil/hwcontext_dxva2.c | 16 ++++++++-------- > 3 files changed, 14 insertions(+), 24 deletions(-) > > diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c > index 283f29f..f94a930 100644 > --- a/libavcodec/nvenc.c > +++ b/libavcodec/nvenc.c > @@ -33,16 +33,11 @@ > # define NVENC_LIBNAME "libnvidia-encode.so.1" > #endif > > -#if defined(_WIN32) > -#include <windows.h> > - > -#define dlopen(filename, flags) LoadLibrary(TEXT(filename)) > -#define dlsym(handle, symbol) GetProcAddress(handle, symbol) > -#define dlclose(handle) FreeLibrary(handle) > -#else > +#if !defined(_WIN32) > #include <dlfcn.h> > #endif > > +#include "libavformat/os_support.h"
FYI, last time i tried to include this file from libavcodec i was told not to since it's libavformat specific. The proper place for these wrappers is probably the compat folder, in a new file similar to w32threads.h > #include "libavutil/hwcontext.h" > #include "libavutil/imgutils.h" > #include "libavutil/avassert.h" _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel