Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg committed Jan 5, 2025
1 parent e79ea8a commit 493cc50
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,8 +1382,8 @@ fn parse_dict(dict: &str) -> Result<dictionary::Owned, ffmpeg::Error> {
let res = av_dict_parse_string(
&mut ptr,
cstr.as_ptr(),
b"=:\0".as_ptr().cast(),
b",\0".as_ptr().cast(),
c"=:".as_ptr().cast(),
c",".as_ptr().cast(),
0,
);
if res != 0 {
Expand Down Expand Up @@ -1643,10 +1643,8 @@ impl EncState {
}
} else {
let mut enc_options = passed_enc_options.clone();
if encoder.name() == "x264" {
if enc_options.get("preset").is_none() {
enc_options.set("preset", "ultrafast");
}
if encoder.name() == "x264" && enc_options.get("preset").is_none() {
enc_options.set("preset", "ultrafast");
}
enc.open_with(enc_options).unwrap()
};
Expand Down Expand Up @@ -1897,7 +1895,7 @@ fn video_filter(
let buffersrc_ctx = avfilter_graph_alloc_filter(
g.as_mut_ptr(),
filter::find("buffer").unwrap().as_mut_ptr(),
"in\0".as_ptr() as _,
c"in".as_ptr() as _,
);
if buffersrc_ctx.is_null() {
panic!("faield to alloc buffersrc filter");
Expand Down

0 comments on commit 493cc50

Please sign in to comment.