diff --git a/Cargo.toml b/Cargo.toml index f42a851..4d16967 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,4 +30,3 @@ camino = "1.1.6" # linking system ffmpeg as fallback. link_system_ffmpeg = ["rusty_ffmpeg/link_system_ffmpeg"] ffmpeg6 = ["rusty_ffmpeg/ffmpeg6"] -ffmpeg7 = ["rusty_ffmpeg/ffmpeg7"] diff --git a/src/avformat/avio.rs b/src/avformat/avio.rs index ae2d79e..2683f07 100644 --- a/src/avformat/avio.rs +++ b/src/avformat/avio.rs @@ -102,18 +102,11 @@ impl AVIOContextCustom { let opaque = unsafe { (opaque as *mut Opaque).as_mut() }.unwrap(); opaque.read_packet.as_mut().unwrap()(&mut opaque.data, buf) } - #[cfg(not(feature = "ffmpeg7"))] unsafe extern "C" fn write_c(opaque: *mut c_void, data: *mut u8, len: i32) -> i32 { let buf = unsafe { slice::from_raw_parts(data, len as usize) }; let opaque = unsafe { (opaque as *mut Opaque).as_mut() }.unwrap(); opaque.write_packet.as_mut().unwrap()(&mut opaque.data, buf) } - #[cfg(feature = "ffmpeg7")] - unsafe extern "C" fn write_c(opaque: *mut c_void, data: *const u8, len: i32) -> i32 { - let buf = unsafe { slice::from_raw_parts(data, len as usize) }; - let opaque = unsafe { (opaque as *mut Opaque).as_mut() }.unwrap(); - opaque.write_packet.as_mut().unwrap()(&mut opaque.data, buf) - } unsafe extern "C" fn seek_c(opaque: *mut c_void, offset: i64, whence: i32) -> i64 { let opaque = unsafe { (opaque as *mut Opaque).as_mut() }.unwrap(); opaque.seek.as_mut().unwrap()(&mut opaque.data, offset, whence)