Skip to content

Bind AMF_VIDEO_CONVERTER_COLOR_PROFILE_ENUM as an Int32 enum - #475

Merged
IanButterworth merged 1 commit into
JuliaIO:masterfrom
bjarthur:bja/amf-color-profile
Oct 27, 2026
Merged

IanButterworth merged 1 commit into
JuliaIO:masterfrom
bjarthur:bja/amf-color-profile

Conversation

@bjarthur

Copy link
Copy Markdown
Member

Fixes #474. The FFmpeg 9 bindings declared the return type of av_amf_get_color_profile as an empty placeholder struct, because the enum lives in AMD's AMF SDK headers, which are not available when generating. A ccall returning an empty mutable struct makes Julia's code generation crash or loop forever (JuliaLang/julia#64383), so for example a juliac build that depends on VideoIO never finishes.

Handle it like AMF_SURFACE_FORMAT: add it to printer_blacklist and define it in the prologue as Int32, with its values from the AMF SDK's components/ColorSpace.h. The bindings are regenerated with Julia 1.11, against FFMPEG_jll 9.0.1 and 8.1.2 as before, keeping the existing artifact paths in the names of anonymous unions.

Add a regression test that the function returns Int32 and compiles.

Fixes JuliaIO#474.  The FFmpeg 9 bindings declared the return type of
av_amf_get_color_profile as an empty placeholder struct, because the enum
lives in AMD's AMF SDK headers, which are not available when generating.
A ccall returning an empty mutable struct makes Julia's code generation
crash or loop forever (JuliaLang/julia#64383), so for example a juliac
build that depends on VideoIO never finishes.

Handle it like AMF_SURFACE_FORMAT: add it to printer_blacklist and define
it in the prologue as Int32, with its values from the AMF SDK's
components/ColorSpace.h.  The bindings are regenerated with Julia 1.11,
against FFMPEG_jll 9.0.1 and 8.1.2 as before, keeping the existing
artifact paths in the names of anonymous unions.

Add a regression test that the function returns Int32 and compiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.89%. Comparing base (2752ec3) to head (36fce09).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #475      +/-   ##
==========================================
- Coverage   84.93%   84.89%   -0.04%     
==========================================
  Files          13       13              
  Lines        2077     2092      +15     
==========================================
+ Hits         1764     1776      +12     
- Misses        313      316       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@IanButterworth IanButterworth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure is #455

@IanButterworth
IanButterworth merged commit 52fb7f8 into JuliaIO:master Oct 27, 2026
23 of 25 checks passed
@IanButterworth

Copy link
Copy Markdown
Member

v1.10.1 release. Thanks!

@bjarthur
bjarthur deleted the bja/amf-color-profile branch October 28, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FFmpeg 9 bindings: av_amf_get_color_profile returns an empty placeholder struct, which hangs or crashes Julia's code generation

2 participants