Skip to content

Commit d3ffa4c

Browse files
committed
clippy
1 parent 75d578e commit d3ffa4c

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

crates/recording/examples/camera-benchmark.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,16 @@ async fn run_camera_encoding_benchmark(
292292

293293
let encode_start = Instant::now();
294294
let timestamp = Duration::from_micros(converted.frame.pts().unwrap_or(0) as u64);
295-
if let Ok(()) =
296-
encoder.queue_preconverted_frame(converted.frame, timestamp, &mut output)
297-
{
298-
let encode_duration = encode_start.elapsed();
299-
let pipeline_latency = converted.submit_time.elapsed();
300-
metrics.record_frame_encoded(encode_duration, pipeline_latency);
295+
match encoder.queue_preconverted_frame(converted.frame, timestamp, &mut output) {
296+
Ok(()) => {
297+
let encode_duration = encode_start.elapsed();
298+
let pipeline_latency = converted.submit_time.elapsed();
299+
metrics.record_frame_encoded(encode_duration, pipeline_latency);
300+
}
301+
Err(e) => {
302+
warn!("Encode error during drain: {}", e);
303+
metrics.record_dropped_output();
304+
}
301305
}
302306
} else {
303307
break;

crates/recording/src/output_pipeline/macos_segmented_ffmpeg.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ impl MacOSSegmentedMuxer {
386386
}
387387
Err(e) => {
388388
error!("Encoder setup failed: {:#}", e);
389-
let _ = ready_tx.send(Err(anyhow!("{e}")));
389+
if let Err(send_err) = ready_tx.send(Err(anyhow!("{e}"))) {
390+
error!("failed to send ready_tx error: {send_err}");
391+
}
390392
return Err(anyhow!("{e}"));
391393
}
392394
};

0 commit comments

Comments
 (0)