[FFmpeg-devel] [PATCH] pixdesc: Add ifdef for dllimport on MSVC.

Robert Nagy ronag89 at gmail.com
Fri May 4 14:59:22 CEST 2012


This should avoid some confusion for library users on MSVC.

> From a06a079daa35c69a40bd2fab0ec3b8cea2853c4a Mon Sep 17 00:00:00 2001
> From: Robert Nagy <ronag89 at gmail.com>
> Date: Fri, 4 May 2012 14:57:47 +0200
> Subject: [PATCH] pixdesc: Add #ifdef for __declspec(dllimport) on MSVC.
>
> ---
>  libavutil/pixdesc.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h
> index f1a2dde..2a782bf 100644
> --- a/libavutil/pixdesc.h
> +++ b/libavutil/pixdesc.h
> @@ -102,7 +102,11 @@ typedef struct AVPixFmtDescriptor{
>  /**
>   * The array of all the pixel format descriptors.
>   */
> +#ifdef _MSC_VER
> +extern __declspec(dllimport) const AVPixFmtDescriptor
av_pix_fmt_descriptors[];
> +#else
>  extern const AVPixFmtDescriptor av_pix_fmt_descriptors[];
> +#endif
>
>  /**
>   * Read a line from an image, and write the values of the
> --
> 1.7.6.msysgit.0


More information about the ffmpeg-devel mailing list