Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 655488 - media-video/makemkv-1.12.2 fails to build with ffmpeg-4.0: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared
Summary: media-video/makemkv-1.12.2 fails to build with ffmpeg-4.0: error: ‘CODEC_FLAG...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: James Le Cuirot
Depends on:
Blocks: ffmpeg-4
  Show dependency tree
Reported: 2018-05-11 14:52 UTC by Louis Sautier (sbraz)
Modified: 2018-05-14 21:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

makemkv-1.12.2-ffmpeg-4.patch (file_655488.txt,1.13 KB, text/plain)
2018-05-11 14:52 UTC, Louis Sautier (sbraz)

Note You need to log in before you can comment on or make changes to this bug.
Description Louis Sautier (sbraz) gentoo-dev 2018-05-11 14:52:42 UTC
Created attachment 530814 [details]

The build currently fails with:
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_init’:
libffabi/src/ffabi.c:520:30: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?                                                                                                                                        
         ctx->avctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
libffabi/src/ffabi.c:520:30: note: each undeclared identifier is reported only once for each function it appears in
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_get_info’:
libffabi/src/ffabi.c:721:28: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?                                                                                                                                        
     if ((ctx->avctx->flags&CODEC_FLAG_GLOBAL_HEADER)!=0)

It looks like this flag has been prefixed since 2.8:
However the old name was still supported until 4.0:

The attached patch taken from negativo17's RPM repository fixes the build.
Comment 1 Larry the Git Cow gentoo-dev 2018-05-14 21:48:40 UTC
The bug has been closed via the following commit(s):

commit 3b2c32569270c1fb2062436efae206e4be737349
Author:     James Le Cuirot <>
AuthorDate: 2018-05-14 21:48:25 +0000
Commit:     James Le Cuirot <>
CommitDate: 2018-05-14 21:48:25 +0000

    media-video/makemkv: Patch for compatibility with ffmpeg 4
    Package-Manager: Portage-2.3.36, Repoman-2.3.9

 media-video/makemkv/files/makemkv-ffmpeg.patch | 25 +++++++++++++++++++++++++
 media-video/makemkv/makemkv-1.12.2.ebuild      |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)