Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

clippy

Richie McIlroy1aac5a658997
diff --git a/crates/enc-mediafoundation/src/video/h264.rs b/crates/enc-mediafoundation/src/video/h264.rs
index 129ba0024..9611b8632 100644
--- a/crates/enc-mediafoundation/src/video/h264.rs
+++ b/crates/enc-mediafoundation/src/video/h264.rs
@@ -542,16 +542,16 @@ impl H264Encoder {
let mut should_exit = false;
while !should_exit {
let health_status = health_monitor.check_health();
- if !health_status.is_healthy {
- if let Some(reason) = health_status.failure_reason {
- let _ = self.cleanup_encoder();
- return Err(EncoderRuntimeError::EncoderUnhealthy {
- reason,
- inputs_without_output: health_status.inputs_without_output,
- process_failures: health_status.consecutive_process_failures,
- frames_encoded: health_status.total_frames_encoded,
- });
- }
+ if !health_status.is_healthy
+ && let Some(reason) = health_status.failure_reason
+ {
+ let _ = self.cleanup_encoder();
+ return Err(EncoderRuntimeError::EncoderUnhealthy {
+ reason,
+ inputs_without_output: health_status.inputs_without_output,
+ process_failures: health_status.consecutive_process_failures,
+ frames_encoded: health_status.total_frames_encoded,
+ });
}
let event = self.event_generator.GetEvent(MF_EVENT_FLAG_NONE)?;
@@ -588,18 +588,18 @@ impl H264Encoder {
Err(_) => {
health_monitor.record_process_failure();
let health_status = health_monitor.check_health();
- if !health_status.is_healthy {
- if let Some(reason) = health_status.failure_reason {
- let _ = self.cleanup_encoder();
- return Err(EncoderRuntimeError::EncoderUnhealthy {
- reason,
- inputs_without_output: health_status
- .inputs_without_output,
- process_failures: health_status
- .consecutive_process_failures,
- frames_encoded: health_status.total_frames_encoded,
- });
- }
+ if !health_status.is_healthy
+ && let Some(reason) = health_status.failure_reason
+ {
+ let _ = self.cleanup_encoder();
+ return Err(EncoderRuntimeError::EncoderUnhealthy {
+ reason,
+ inputs_without_output: health_status
+ .inputs_without_output,
+ process_failures: health_status
+ .consecutive_process_failures,
+ frames_encoded: health_status.total_frames_encoded,
+ });
}
should_exit = false;
}