diff options
author | Martin Storsjö <martin@martin.st> | 2017-08-24 22:07:04 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2017-08-31 14:22:06 +0300 |
commit | abf1c058d1bd0ed1b820ea5e501a4484756f00b0 (patch) | |
tree | f2fad10a28333210b238629315577204491576d5 /libavcodec/internal.h | |
parent | e41daa62465036ad36ad0bd14e4936e848d7f07e (diff) | |
download | ffmpeg-abf1c058d1bd0ed1b820ea5e501a4484756f00b0.tar.gz |
msvc: Properly specify dllexport for data symbols shared across dll boundaries
We currently only have exported data symbols within libavcodec, but
the concept is easy to extend to other libraries if necessary.
The attribute declaration needs to be in a private header though,
since we can't use CONFIG_SHARED in public installed headers.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r-- | libavcodec/internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 403fb4a090..0efe34f667 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -285,4 +285,14 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame); */ AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx); +#if defined(_MSC_VER) && CONFIG_SHARED +#ifdef BUILDING_avcodec +# define av_export_avcodec __declspec(dllexport) +#else +# define av_export_avcodec __declspec(dllimport) +#endif +#else +# define av_export_avcodec +#endif + #endif /* AVCODEC_INTERNAL_H */ |