Closed wangjia184 closed 7 months ago
I tried to clean target
folder and rebuild ffmpeg vcpkg, it does not work.
I have to downgrade ffmpeg to 6 to avoid this error
[package.metadata.vcpkg]
dependencies = [
"ffmpeg[ffmpeg,x264,avcodec,avdevice,avfilter,avformat]:x64-windows-static",
]
git = "https://github.com/microsoft/vcpkg"
rev = "0557210"
[dependencies]
rsmpeg = { version = "0.15.0", default-features = false, features = [
"ffmpeg6",
] }
Yeah, if you see this error message:
error[E0605]: non-primitive cast: `unsafe extern "C" fn(*mut c_void, *const u8, i32) -> i32 {write_c}` as `unsafe extern "C" fn(*mut c_void, *mut u8, i32) -> i32`
It might be that you are not using FFmpeg 7. AFAIK, vcpkg haven't upgraded to FFmpeg 7 yet: https://github.com/microsoft/vcpkg/pull/38011. Therefore you need to specify ffmpeg6
feature.
rsmpeg is a binding crate, if the given library header files(which is provided by vcpkg here) don't match the rsmpeg's feature set, it won't pass compilation.
Feel free to reopen if you have more questions. :-)
After upgrading to 0.15.0 with ffmpeg 7.0, it fails to complie
The vcpkg is built successfully. But rsmpeg cannot be built