Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI... #77

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ffmpeg-sys-next"
version = "7.0.0"
version = "7.0.1"
build = "build.rs"
links = "ffmpeg"

Expand Down
18 changes: 11 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ impl ParseCallbacks for Callbacks {
let codec_flag_prefix = "AV_CODEC_FLAG_";
let error_max_size = "AV_ERROR_MAX_STRING_SIZE";

if value >= i64::min_value() && _name.starts_with(ch_layout_prefix) {
if _name.starts_with(ch_layout_prefix) {
Some(IntKind::ULongLong)
} else if value >= i32::min_value() as i64
&& value <= i32::max_value() as i64
} else if value >= i32::MIN as i64
&& value <= i32::MAX as i64
&& (_name.starts_with(codec_cap_prefix) || _name.starts_with(codec_flag_prefix))
{
Some(IntKind::UInt)
Expand All @@ -92,7 +92,7 @@ impl ParseCallbacks for Callbacks {
name: "usize",
is_signed: false,
})
} else if value >= i32::min_value() as i64 && value <= i32::max_value() as i64 {
} else if value >= i32::MIN as i64 && value <= i32::MAX as i64 {
Some(IntKind::Int)
} else {
None
Expand Down Expand Up @@ -151,7 +151,7 @@ fn source() -> PathBuf {

fn search() -> PathBuf {
let mut absolute = env::current_dir().unwrap();
absolute.push(&output());
absolute.push(output());
absolute.push("dist");

absolute
Expand Down Expand Up @@ -361,7 +361,7 @@ fn build() -> io::Result<()> {
if !Command::new("make")
.arg("-j")
.arg(num_cpus::get().to_string())
.current_dir(&source())
.current_dir(source())
.status()?
.success()
{
Expand All @@ -370,7 +370,7 @@ fn build() -> io::Result<()> {

// run make install
if !Command::new("make")
.current_dir(&source())
.current_dir(source())
.arg("install")
.status()?
.success()
Expand Down Expand Up @@ -525,6 +525,10 @@ fn check_features(
continue;
}
}
// Here so the features are listed for rust-ffmpeg at build time. Does
// NOT represent activated features, just features that exist (hence the
// lack of "=true" at the end)
println!(r#"cargo:{}="#, var);

let var_str = format!("[{var}]", var = var);
let pos = var_str.len()
Expand Down
2 changes: 1 addition & 1 deletion src/avutil/rational.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub unsafe fn av_cmp_q(a: AVRational, b: AVRational) -> c_int {
} else if a.num != 0 && b.num != 0 {
((i64::from(a.num) >> 31) - (i64::from(b.num) >> 31)) as c_int
} else {
c_int::min_value()
c_int::MIN
}
}

Expand Down
Loading