Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-primitive cast: `unsafe extern "C" #178

Closed
lantq1979 opened this issue Apr 22, 2024 · 1 comment
Closed

non-primitive cast: `unsafe extern "C" #178

lantq1979 opened this issue Apr 22, 2024 · 1 comment

Comments

@lantq1979
Copy link

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

rsmpeg-0.15.0+ffmpeg.7.0\src\avformat\avio.rs:125:51
|
125 | write_packet.is_some().then_some( write_c as _), //write_c as _
| ^^^^^^^^^^^^ invalid cast

@ldm0
Copy link
Member

ldm0 commented Apr 22, 2024

You can check the comment above: https://github.com/larksuite/rsmpeg/blob/master/src/avformat/avio.rs#L124

It seems that you are using FFmpeg 6.*. Please import rsmpeg like this:

rsmpeg = { version = "0.15.0", default-features = false, features = ["ffmpeg6"] }

@ldm0 ldm0 closed this as completed Sep 17, 2024
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

No branches or pull requests

2 participants