After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779249 - x264enc: Crashes on Windows/64 bit
x264enc: Crashes on Windows/64 bit
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal blocker
: 1.11.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2017-02-26 10:35 UTC by Sebastian Dröge (slomo)
Modified: 2017-04-27 09:21 UTC
See Also:
GNOME target: ---
GNOME version: ---

Use __declspec(dllimport) with MinGW too (1.01 KB, patch)
2017-04-27 07:15 UTC, Nirbheek Chauhan
committed Details | Review

Description Sebastian Dröge (slomo) 2017-02-26 10:35:09 UTC
This seems to be somehow caused by bug #777903, reverting that commit makes it work again. However things still look a bit wrong then.

Program received signal SIGSEGV, Segmentation fault.
0x000000006e7c183b in load_x264_libraries () at gstx264enc.c:295
295       if (*default_vtable.x264_bit_depth == 8) {
(gdb) print default_vtable.x264_bit_depth
$1 = (const int *) 0xda9978bc
(gdb) print &x264_bit_depth
$2 = (const int *) 0x7ff9da9978bc
(gdb) print *((const int *) 0x7ff9da9978bc)
Cannot access memory at address 0x7ff9da9978bc
(gdb) print *((const int *) 0x7ffbda9978bc)
$3 = 8
(gdb) print x264_bit_depth
Cannot access memory at address 0x7ff9da9978bc

With the old version, directly accessing x264_bit_depth also fails, but via the default_vtable for some reason it works (and has the correct pointer address, note the 'b' vs. '9').

For 1.11.2, I've reverted the patch for the Windows 64 bit build only.
Comment 1 Nirbheek Chauhan 2017-04-27 07:15:37 UTC
Created attachment 350523 [details] [review]
Use __declspec(dllimport) with MinGW too

This patch fixes it for me, and we should commit this for .92. However, I want to revisit the original change and see if it's still needed with MSVC even with this patch.
Comment 2 Sebastian Dröge (slomo) 2017-04-27 09:21:00 UTC
commit c6a002613759070f814ecab18c4bfd5cc68d8251
Author: Nirbheek Chauhan <>
Date:   Thu Apr 27 12:42:34 2017 +0530

    x264: Use __declspec(dllimport) with MinGW too
    x264.h says this isn't needed with MinGW, but it looks like it is.