From c6a002613759070f814ecab18c4bfd5cc68d8251 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 27 Apr 2017 12:42:34 +0530 Subject: [PATCH] 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 --- ext/x264/gstx264enc.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/x264/gstx264enc.h b/ext/x264/gstx264enc.h index 732e12484c..6f4ad4839e 100644 --- a/ext/x264/gstx264enc.h +++ b/ext/x264/gstx264enc.h @@ -30,6 +30,13 @@ #include #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 G_BEGIN_DECLS