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 792111 - x264enc: Compilation Error with Git x264
x264enc: Compilation Error with Git x264
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal critical
: 1.13.90
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
: 793809 (view as bug list)
Depends on:
Reported: 2018-01-02 02:47 UTC by Vick Kumar
Modified: 2018-02-28 10:48 UTC
See Also:
GNOME target: ---
GNOME version: ---

x264enc: fix build with newer x264 with support for multiple bit depths (2.99 KB, patch)
2018-02-28 10:17 UTC, Tim-Philipp Müller
committed Details | Review

Description Vick Kumar 2018-01-02 02:47:30 UTC
When I try to compile GStreamer from git against x264 compiled on Ubuntu 16.04LTS also from latest Git.

I get compilation error as follows:

make[3]: Entering directory '/home/tladmin/src/gstreamer/gst-plugins-ugly/ext/x264'
  CC       libgstx264_la-gstx264enc.lo
gstx264enc.c: In function ‘plugin_init’:
gstx264enc.c:2927:36: error: ‘x264_bit_depth’ undeclared (first use in this function)
   default_vtable.x264_bit_depth = &x264_bit_depth;
Comment 1 Tim-Philipp Müller 2018-01-02 09:58:15 UTC
Right, I guess that's related to;h=71ed44c7312438fac7c5c5301e45522e57127db4
Comment 2 Christoph Reiter (lazka) 2018-02-14 08:48:25 UTC
Here is the related ffmpeg fix:
Comment 3 Sebastian Dröge (slomo) 2018-02-25 14:57:43 UTC
*** Bug 793809 has been marked as a duplicate of this bug. ***
Comment 4 Sebastian Dröge (slomo) 2018-02-26 10:12:00 UTC
The solution here would be to disable all the dlopen() related code when compiling with a new enough x264, check the compile-time #defines to see if it was only compiled for a single bit depth and otherwise assume that all formats are supported. And configure the bitdepth in the encoder parameters.
Comment 5 Tim-Philipp Müller 2018-02-28 01:02:57 UTC
I'll have a look at this.
Comment 6 Tim-Philipp Müller 2018-02-28 10:17:45 UTC
Created attachment 369090 [details] [review]
x264enc: fix build with newer x264 with support for multiple bit depths
Comment 7 Tim-Philipp Müller 2018-02-28 10:48:29 UTC
mit 83c38dc44622611c1f67dd26e4cb383c5aef90f6 (HEAD -> master)
Author: Tim-Philipp Müller <>
Date:   Wed Feb 28 10:07:13 2018 +0000

    x264enc: fix build with newer x264 with support for multiple bit depths
    libx264 used to be built for one specific bit depth, and if we
    wanted to support multiple bit depths we would have to dynamically
    load the right .so from different paths. That has changed now, and
    libx264 can include support for multiple depths in the same lib,
    so we don't need to do the dlopen() dance any more. We'll keep
    the vtable stuff around until we can drop support for older x264.
    gstx264enc.c:2927:36: error: ‘x264_bit_depth’ undeclared