[FFmpeg-devel] [PATCH] all: avoid data imports across DLL boundaries

wm4 nfxjfg at googlemail.com
Wed Aug 23 12:12:42 EEST 2017

On Mon, 21 Aug 2017 19:51:56 +0200
wm4 <nfxjfg at googlemail.com> wrote:

> From: Pedro Pombeiro <pedropombeiro at gmail.com>
> DLL data imports cause problems on Windows. They normally require
> each variable to be correctly marked with dllimport/dllexport
> declspecs. For MSVC, we define av_export to dllimport declspec. This
> is not entirely correct - depending on which sub-lib is built, they
> should be marked to dllexport instead. It happens to work with MSVC,
> because it supports exports incorrectly marked as imports. Trying to
> use this breaks on MinGW and results in linker errors.
> On MinGW, not using any import/export specifiers happens to work,
> because binutils and the MinGW runtime provide "pseudo relocations",
> which manually fix these imports at load time. This does not work with
> MinGW WinRT builds: the relocations cannot be performed because this
> would require writing to the code section, which is not allowed.
> Get rid of all these issues by not using data exports/imports. The
> public API is already free of them, but avpriv_ symbols make extensive
> use of them. Replace them all with getters.
> Signed-off-by: wm4 <nfxjfg at googlemail.com>
> ---

Ping. This is a pretty big change.

More information about the ffmpeg-devel mailing list