Opened 2 years ago

Closed 22 months ago

#13314 closed Bug Report - General (Fixed)

Build error in libavcodec with newer x264 versions

Reported by: Frank Phillips Owned by: Peter Bennett
Priority: minor Milestone: 29.2
Component: 3rd Party - FFMPEG Version: v29.1
Severity: medium Keywords:
Cc: Ticket locked: no


I recently upgraded from x264 version 152 to 155 and got this error:

libavcodec/libx264.c: In function ‘X264_frame’:
libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’?
     if (x264_bit_depth > 8)
libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’?
     if (x264_bit_depth == 8)
CC	libavcodec/lossless_audiodsp.o
make[2]: *** [/build/mythtv-fixes-git/src/mythtv/mythtv/external/FFmpeg/common.mak:60: libavcodec/libx264.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/build/mythtv-fixes-git/src/mythtv/mythtv/external/FFmpeg'
make[1]: *** [Makefile:32: FFmpeg-all] Error 2
make[1]: Leaving directory '/build/mythtv-fixes-git/src/mythtv/mythtv/external'
make: *** [Makefile:67: external] Error 2

Upstream bug and fix:

Arch Linux MythTV users (including myself) are using a similar patch:

I believe master is unaffected due to ffmpeg resyncs.

Change History (5)

comment:1 Changed 2 years ago by Peter Bennett

By default x264 is disabled in the mythtv configure (at least in master). Are you explicitly enabling it in the mythtv configure?

Last edited 2 years ago by Peter Bennett (previous) (diff)

comment:2 Changed 2 years ago by Frank Phillips

Yes, most likely for HLS streaming. I don't think this would be unusual to find in other distro packages, either.

comment:3 Changed 2 years ago by Stuart Auchterlonie

Milestone: needs_triage29.2

comment:4 Changed 22 months ago by Frank Phillips

I can confirm this is fixed by 74fff5c.

Last edited 22 months ago by Frank Phillips (previous) (diff)

comment:5 Changed 22 months ago by Peter Bennett

Resolution: Fixed
Status: newclosed

Fixed in 74fff5c2856d592b8b2dfd41ac5cc08f372a8993

Author: David Engel <>
Date:   Thu Oct 4 11:06:54 2018 -0500

    Add support for libx264 version >= 153.
    This commit is from the FFmpeg release/3.2 branch.  It has the
    following commit information.
    commit 6d654eb036ce44856ca14c176baba8fb1410db32
    Author: Luca Barbato <>
    Date:   Tue Dec 26 12:32:42 2017 +0100
        x264: Support version 153
        It has native simultaneus 8 and 10 bit support.
        (cherry picked from commit c6558e8840fbb2386bf8742e4d68dd6e067d262e)
        (cherry picked from commit 96e8400553ae47f8f8df5b66cc268297ba38824c)
        Signed-off-by: Michael Niedermayer <>
Note: See TracTickets for help on using tickets.