Skip to content

amf v1.4.36: DisplayCapture.h bare extern "C" breaks C compilation (mingw/win-x64) #7

Description

@ryan-morris

Summary

AMF headers v1.4.36 ship AMF/components/DisplayCapture.h with a bare extern "C" block not guarded by #ifdef __cplusplus. FFmpeg's libavfilter/vsrc_amf.c is a C translation unit that includes AMF headers directly, so under the mingw-w64 GCC cross-compiler it fails:

DisplayCapture.h:43:8: error: expected identifier or '(' before string constant
   43 | extern "C"
make: *** [libavfilter/vsrc_amf.o] Error 1

AMF headers are Windows-only (BUILD_AMF=1 only on win-x64), so this breaks every win-x64 build (all licenses).

Workaround

deps.json holds amf at v1.4.35 on win-x64 via a platform-scoped override; the default tracks latest.

To resolve

When upstream guards the extern "C" (or vsrc_amf.c stops including the offending header), bump the amf default and drop the win-x64 override.

Upstream: https://github.com/GPUOpen-LibrariesAndSDKs/AMF

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions