Skip to content

Commit d424894

Browse files
committed
formatting
1 parent fc25539 commit d424894

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

av1an-core/src/scenes.rs

+1
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ fn get_test_args() -> EncodeArgs {
307307
vs_script: None,
308308
zones: None,
309309
scaler: String::new(),
310+
ignore_frame_mismatch: false,
310311
}
311312
}
312313

av1an-core/src/settings.rs

+18-7
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,12 @@ impl EncodeArgs {
436436
let encoded_frames = num_frames(chunk.output().as_ref());
437437

438438
let err_str = match encoded_frames {
439-
Ok(encoded_frames) if !ignore_frame_mismatch && (encoded_frames != chunk.frames) => Some(format!(
440-
"FRAME MISMATCH: chunk {}: {}/{} (actual/expected frames)",
441-
chunk.index, encoded_frames, chunk.frames
442-
)),
439+
Ok(encoded_frames) if !ignore_frame_mismatch && (encoded_frames != chunk.frames) => {
440+
Some(format!(
441+
"FRAME MISMATCH: chunk {}: {}/{} (actual/expected frames)",
442+
chunk.index, encoded_frames, chunk.frames
443+
))
444+
}
443445
Err(error) => Some(format!(
444446
"FAILED TO COUNT FRAMES: chunk {}: {}",
445447
chunk.index, error
@@ -560,9 +562,13 @@ properly into a mkv file. Specify mkvmerge as the concatenation method by settin
560562
}
561563

562564
if self.vmaf_res == "inputres" {
563-
let inputres = self.input.resolution()?.clone();
565+
let inputres = self.input.resolution()?;
564566
self.vmaf_res.clear();
565-
self.vmaf_res.push_str(&format!("{}x{}", &inputres.0.to_string(), &inputres.1.to_string()));
567+
self.vmaf_res.push_str(&format!(
568+
"{}x{}",
569+
&inputres.0.to_string(),
570+
&inputres.1.to_string()
571+
));
566572
self.vmaf_res.to_string();
567573
}
568574

@@ -1323,7 +1329,12 @@ properly into a mkv file. Specify mkvmerge as the concatenation method by settin
13231329
let audio_size_ref = Arc::clone(&audio_size_bytes);
13241330
let (tx, rx) = mpsc::channel();
13251331
let handle = s.spawn(|_| {
1326-
broker.encoding_loop(tx, self.set_thread_affinity, audio_size_ref, self.ignore_frame_mismatch);
1332+
broker.encoding_loop(
1333+
tx,
1334+
self.set_thread_affinity,
1335+
audio_size_ref,
1336+
self.ignore_frame_mismatch,
1337+
);
13271338
});
13281339

13291340
// Queue::encoding_loop only sends a message if there was an error (meaning a chunk crashed)

0 commit comments

Comments
 (0)