larksuite / rsmpeg

A Rust crate that exposes FFmpeg's power as much as possible.
https://docs.rs/rsmpeg/latest/rsmpeg/
MIT License
677 stars 41 forks source link

invalid cast error #193

Closed wangjia184 closed 2 months ago

wangjia184 commented 2 months ago
[package.metadata.vcpkg]
git = "https://github.com/microsoft/vcpkg"
rev = "efb544d"
dependencies = [
    "ffmpeg[ffmpeg,x264,avcodec,avdevice,avfilter,avformat]:x64-windows-static-md",
]

[dependencies]
rsmpeg = { version = "0.15.1", default-features = false, features = [] }
error[E0605]: non-primitive cast: `unsafe extern "C" fn(*mut c_void, *mut u8, i32) -> i32 {write_c}` as `unsafe extern "C" fn(*mut c_void, *const u8, i32) -> i32`
   --> C:\Users\xxx\.cargo\registry\src\mirrors.ustc.edu.cn-4affec411d11e50f\rsmpeg-0.15.1+ffmpeg.7.0\src\avformat\avio.rs:125:50
    |
125 |                 write_packet.is_some().then_some(write_c as _),
    |                                                  ^^^^^^^^^^^^ invalid cast