Please include as much info as possible to save me (solo maintainer helping for free) some time. A minimal, complete, and reproducible example is a must. Link to a gist if you don't feel like posting all the code inline. At the same time, please leave out unnecessary code so I don't need to wade through a hundred lines to get to the problematic part. Tell me your OS, FFmpeg version, etc. if there's even a slim chance of relevancy.
The following code segfaults without the unsafe keyword:
fn main() {
ffmpeg_next::init().unwrap();
for device in ffmpeg_next::device::input::audio() {
println!("{}", device.description());
}
}
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.32s
Running `target\debug\ffmpeg-camera-test.exe`
Libavfilter virtual input device
OpenAL audio capture device
error: process didn't exit successfully: `target\debug\ffmpeg-camera-test.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
Segmentation fault
It works if you use .name(), which leads me to believe that the description can be null.
fn main() {
ffmpeg_next::init().unwrap();
for device in ffmpeg_next::device::input::audio() {
println!("{}", device.name());
}
}
Compiling ffmpeg-camera-test v0.1.0 (C:\Users\Drew\my_code\ffmpeg-camera-test)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.85s
Running `target\debug\ffmpeg-camera-test.exe`
lavfi
openal
libcdio
I'm on Windows 11 using ffmpeg-next = "8.0.0" and FFmpeg version 8.0 (latest release, 2025-08-22) from here: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
Please include as much info as possible to save me (solo maintainer helping for free) some time. A minimal, complete, and reproducible example is a must. Link to a gist if you don't feel like posting all the code inline. At the same time, please leave out unnecessary code so I don't need to wade through a hundred lines to get to the problematic part. Tell me your OS, FFmpeg version, etc. if there's even a slim chance of relevancy.
The following code segfaults without the
unsafekeyword:It works if you use
.name(), which leads me to believe that the description can be null.I'm on Windows 11 using
ffmpeg-next = "8.0.0"and FFmpeg version 8.0 (latest release, 2025-08-22) from here: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z