summaryrefslogtreecommitdiff
path: root/ext/x264
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-04-27 12:42:34 +0530
committerSebastian Dröge <sebastian@centricular.com>2017-04-27 12:20:42 +0300
commitc6a002613759070f814ecab18c4bfd5cc68d8251 (patch)
treea72b4d88fede8717f2a8dc4b11f5bac69d5f7968 /ext/x264
parentfb30e24499bc75b2ea6bf84a4f9132a75a63f274 (diff)
x264: Use __declspec(dllimport) with MinGW too
x264.h says this isn't needed with MinGW, but it looks like it is. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=779249
Diffstat (limited to 'ext/x264')
-rw-r--r--ext/x264/gstx264enc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/x264/gstx264enc.h b/ext/x264/gstx264enc.h
index 732e1248..6f4ad483 100644
--- a/ext/x264/gstx264enc.h
+++ b/ext/x264/gstx264enc.h
@@ -30,6 +30,13 @@
#include <stdint.h>
#endif
+/* The x264.h header says this isn't needed with MinGW, but sometimes the
+ * compiler is unable to correctly do the pointer indirection for us, which
+ * leads to a segfault when you try to dereference any const values provided
+ * by x264.dll. See: https://bugzilla.gnome.org/show_bug.cgi?id=779249 */
+#if defined(_WIN32) && !defined(X264_API_IMPORTS)
+# define X264_API_IMPORTS
+#endif
#include <x264.h>
G_BEGIN_DECLS