Skip to content

Commit

Permalink
Fail if compiling against dav1d newer than 1.2.1
Browse files Browse the repository at this point in the history
Newer versions broke API and ABI, and using such a version causes memory
corruption.
  • Loading branch information
sdroege authored and lu-zero committed Oct 24, 2023
1 parent f529dd0 commit 3d8c514
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions dav1d-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ build = "build.rs"

[build-dependencies]
system-deps = "6.0"
pkg-config = "0.3"

[dependencies]
libc = "0.2"
Expand Down
5 changes: 5 additions & 0 deletions dav1d-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,9 @@ fn main() {
.add_build_internal("dav1d", build::build_from_src)
.probe()
.unwrap();

pkg_config::Config::new()
.range_version("1.0.0"..="1.2.1")
.probe("dav1d")
.unwrap();
}

0 comments on commit 3d8c514

Please sign in to comment.