summaryrefslogtreecommitdiffstats
path: root/libavcodec/internal.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2017-09-14 08:33:05 +0300
committerMartin Storsjö <martin@martin.st>2017-11-19 22:01:38 +0200
commit3152058bf1dca318898550efacf0286f4836cae6 (patch)
tree26aeb52003df2933b15ef218112769224b6da774 /libavcodec/internal.h
parentbad7ce1d82f0b7da55086b8c6124eff0d35a1b1a (diff)
downloadffmpeg-streaming-3152058bf1dca318898550efacf0286f4836cae6.zip
ffmpeg-streaming-3152058bf1dca318898550efacf0286f4836cae6.tar.gz
libavcodec: Don't use dllexport, only dllimport when building DLLs
The only purpose of dllexport (which is set while building the library that exports the symbols) is to have the linker automatically export such symbols into a DLL without using a def file - it doesn't affect the generated code. For both MSVC and mingw builds, this isn't essential since we override what symbols to export via an autogenerated def file instead. Update a comment in configure to refer to the right concept. With lld, this avoids warnings about duplicate export directives, when some symbols are requested to be exported both via dllexport attributes and via the autogenerated def file. This also reduces the number of lines of code marginally. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r--libavcodec/internal.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index da1b2fa..868e3df 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -285,12 +285,8 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame);
*/
AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx);
-#if defined(_WIN32) && CONFIG_SHARED
-#ifdef BUILDING_avcodec
-# define av_export_avcodec __declspec(dllexport)
-#else
+#if defined(_WIN32) && CONFIG_SHARED && !defined(BUILDING_avcodec)
# define av_export_avcodec __declspec(dllimport)
-#endif
#else
# define av_export_avcodec
#endif
OpenPOWER on IntegriCloud