Browse Source

libx264: Define X264_API_IMPORTS on MSVC/ICL

libx264 has a few data exports which require X264_API_IMPORTS
to be defined if we link to libx264 dynamically on Windows.

In a similar fashion to how we handle our compat snprintf
implementation, if we define it all the time, the compiler
will first try and link to __imp_x264_symbol_name, and failing
that, as in the case of a static libx264, will attempt to link
to the non-prefixed symbol, which has already been pulled in by
other x264 functions' object files.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
tags/n2.1
Derek Buitenhuis 12 years ago
parent
commit
4719040cd1
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/libx264.c

+ 5
- 0
libavcodec/libx264.c View File

@@ -25,6 +25,11 @@
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "internal.h"

#if defined(_MSC_VER)
#define X264_API_IMPORTS 1
#endif

#include <x264.h>
#include <float.h>
#include <math.h>


Loading…
Cancel
Save