diff --git a/build.rs b/build.rs index 68adda1..3d7407f 100644 --- a/build.rs +++ b/build.rs @@ -1176,6 +1176,12 @@ fn main() { .header(search_include(&include_paths, "libavcodec/avfft.h")) .header(search_include(&include_paths, "libavcodec/vorbis_parser.h")); + if ffmpeg_major_version >= 5 { + if let Some(bsf_header) = maybe_search_include(&include_paths, "libavcodec/bsf.h") { + builder = builder.header(bsf_header); + } + } + if ffmpeg_major_version < 5 { builder = builder.header(search_include(&include_paths, "libavcodec/vaapi.h")) }