Skip to content

Commit

Permalink
fix unexpected cfg warning, bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg committed Jul 28, 2024
1 parent e107aba commit b817acc
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 52 deletions.
100 changes: 50 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::env;

fn main() {
println!("cargo::rustc-check-cfg=cfg(ffmpeg_7_0)");
for (name, _value) in env::vars() {
if name.starts_with("DEP_FFMPEG_") {
println!(
r#"cargo:rustc-cfg=feature="{}""#,
r#"cargo::rustc-cfg={}"#,
name["DEP_FFMPEG_".len()..name.len()].to_lowercase()
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ impl AudioHandle {
let audio_decoder_rate = dec_audio.rate() as i32;
enc_audio.set_rate(audio_decoder_rate);
enc_audio.set_channel_layout(enc_audio_channel_layout);
#[cfg(not(feature = "ffmpeg_7_0"))] // in ffmpeg 7, this is handled by set_channel_layout
#[cfg(not(ffmpeg_7_0))] // in ffmpeg 7, this is handled by set_channel_layout
enc_audio.set_channels(enc_audio_channel_layout.channels());
let audio_encode_format = audio_codec.formats().unwrap().next().unwrap();
enc_audio.set_format(audio_encode_format);
Expand Down

0 comments on commit b817acc

Please sign in to comment.