opencv-rust compatability
Rust's opencv bindings used to just work with rusty_ffmpeg, but switching from 0.14 to 0.15 breaks linking.
Adding this line to any Cargo.toml using rusty_ffmpeg v0.15+ causes this issue:
opencv = { version = "0.93.1", default-features = false, features = ["clang-runtime"] }
/usr/bin/ld: /workspaces/myproject/ffmpeg/./libavutil/timestamp.h:76: undefined reference to `av_ts_make_time_string2'
/usr/bin/ld: /workspaces/myproject/ffmpeg/./libavutil/timestamp.h:76: undefined reference to `av_ts_make_time_string2'
/usr/bin/ld: /workspaces/myproject/ffmpeg/./libavutil/timestamp.h:76: undefined reference to `av_ts_make_time_string2'
/usr/bin/ld: /workspaces/myproject/ffmpeg/./libavutil/timestamp.h:76: undefined reference to `av_ts_make_time_string2'
Tested with FFmpeg 7.0 and 7.1
Turns out the issue is in linking_with_pkg_config when introduced here.
This old behavior works fine:
.statik(true).cargo_metadata(true)
The new behavior (.cargo_metadata(false)) is what causes the linker failure
Seems like the build.rs linking was updated recently with 0.16.3. With these changes there are no longer build failures, but there are memory issues causing segfaults on a bunch of struct member accesses. Weird. Using .statik(true).cargo_metadata(true) still fixes this.