Skip to content

fix(build): skip avfft.h for FFmpeg >= 8 (removed upstream)#125

Open
gaurav02081 wants to merge 1 commit intozmwangx:masterfrom
gaurav02081:gaurav-v1
Open

fix(build): skip avfft.h for FFmpeg >= 8 (removed upstream)#125
gaurav02081 wants to merge 1 commit intozmwangx:masterfrom
gaurav02081:gaurav-v1

Conversation

@gaurav02081
Copy link

Problem

libavcodec/avfft.h was deprecated in FFmpeg 6.0 (lavc 60.25.100) and
removed in FFmpeg 8.0. Building against FFmpeg ≥ 8 could fail depending
on include path resolution behavior.

The previous implementation relied on an exists() guard after
search_include, which depended on fallback filesystem behavior rather
than explicit version semantics.

Fixes #117.


Solution

  • Gate inclusion of libavcodec/avfft.h on ffmpeg_major_version < 8
  • Use the existing maybe_search_include helper for safe lookup
  • Follow the same version-gating pattern already used for vaapi.h

This removes reliance on filesystem fallback behavior and makes the
intent explicit and consistent with existing header guards.


Testing

Tested on macOS with FFmpeg 8.0.1 (Homebrew):

  • cargo build succeeds
  • avfft.h is not included in bindgen output
  • No avfft symbols appear in generated bindings.rs
  • No regressions observed

This preserves compatibility for users building against older FFmpeg
versions while ensuring clean builds with FFmpeg 8+.

 was deprecated in FFmpeg 6.0 and removed in FFmpeg 8.0.
The previous exists-based guard relied on search_include fallback behavior.

Gate inclusion on  and use
for safe lookup, matching the existing vaapi.h version guard pattern.

Fixes zmwangx#117.
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.

libavcodec/avfft.h: removed in FFmpeg 8.0

2 participants