Not specifying log line data type as i8 to make project compile on platforms, where c_char is not represented with i8 types.
Having it typed as i8 leads to the following error on ARM64 NVIDIA Jetson machine:
error[E0308]: mismatched types
--> video-rs/src/ffi.rs:507:56
|
507 | if let Ok(line) = std::ffi::CStr::from_ptr(line.as_mut_ptr()).to_str() {
| ------------------------ ^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const u8`
found raw pointer `*mut i8`
Similarly av_opt_flag_is_set expects flags to be provided as c_char pointers, but in ffi.rs these are provided as i8 pointers; hence casting av_opt_flag_is_set arguments as c_char pointer rather than i8 pointer.
Not specifying log line data type as
i8
to make project compile on platforms, wherec_char
is not represented with i8 types. Having it typed asi8
leads to the following error on ARM64 NVIDIA Jetson machine:Similarly
av_opt_flag_is_set
expects flags to be provided asc_char
pointers, but inffi.rs
these are provided asi8
pointers; hence castingav_opt_flag_is_set
arguments asc_char
pointer rather thani8
pointer.