fix(build): skip avfft.h for FFmpeg >= 8 (removed upstream)#125
Open
gaurav02081 wants to merge 1 commit intozmwangx:masterfrom
Open
fix(build): skip avfft.h for FFmpeg >= 8 (removed upstream)#125gaurav02081 wants to merge 1 commit intozmwangx:masterfrom
gaurav02081 wants to merge 1 commit intozmwangx:masterfrom
Conversation
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.
bfe6d24 to
f39113f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
libavcodec/avfft.hwas deprecated in FFmpeg 6.0 (lavc 60.25.100) andremoved in FFmpeg 8.0. Building against FFmpeg ≥ 8 could fail depending
on include path resolution behavior.
The previous implementation relied on an
exists()guard aftersearch_include, which depended on fallback filesystem behavior ratherthan explicit version semantics.
Fixes #117.
Solution
libavcodec/avfft.honffmpeg_major_version < 8maybe_search_includehelper for safe lookupvaapi.hThis 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 buildsucceedsavfft.his not included in bindgen outputavfftsymbols appear in generatedbindings.rsThis preserves compatibility for users building against older FFmpeg
versions while ensuring clean builds with FFmpeg 8+.