@@ -542,16 +542,16 @@ impl H264Encoder {
542542 let mut should_exit = false ;
543543 while !should_exit {
544544 let health_status = health_monitor. check_health ( ) ;
545- if !health_status. is_healthy {
546- if let Some ( reason) = health_status. failure_reason {
547- let _ = self . cleanup_encoder ( ) ;
548- return Err ( EncoderRuntimeError :: EncoderUnhealthy {
549- reason ,
550- inputs_without_output : health_status . inputs_without_output ,
551- process_failures : health_status. consecutive_process_failures ,
552- frames_encoded : health_status. total_frames_encoded ,
553- } ) ;
554- }
545+ if !health_status. is_healthy
546+ && let Some ( reason) = health_status. failure_reason
547+ {
548+ let _ = self . cleanup_encoder ( ) ;
549+ return Err ( EncoderRuntimeError :: EncoderUnhealthy {
550+ reason ,
551+ inputs_without_output : health_status. inputs_without_output ,
552+ process_failures : health_status. consecutive_process_failures ,
553+ frames_encoded : health_status . total_frames_encoded ,
554+ } ) ;
555555 }
556556
557557 let event = self . event_generator . GetEvent ( MF_EVENT_FLAG_NONE ) ?;
@@ -588,18 +588,18 @@ impl H264Encoder {
588588 Err ( _) => {
589589 health_monitor. record_process_failure ( ) ;
590590 let health_status = health_monitor. check_health ( ) ;
591- if !health_status. is_healthy {
592- if let Some ( reason) = health_status. failure_reason {
593- let _ = self . cleanup_encoder ( ) ;
594- return Err ( EncoderRuntimeError :: EncoderUnhealthy {
595- reason ,
596- inputs_without_output : health_status
597- . inputs_without_output ,
598- process_failures : health_status
599- . consecutive_process_failures ,
600- frames_encoded : health_status . total_frames_encoded ,
601- } ) ;
602- }
591+ if !health_status. is_healthy
592+ && let Some ( reason) = health_status. failure_reason
593+ {
594+ let _ = self . cleanup_encoder ( ) ;
595+ return Err ( EncoderRuntimeError :: EncoderUnhealthy {
596+ reason ,
597+ inputs_without_output : health_status
598+ . inputs_without_output ,
599+ process_failures : health_status
600+ . consecutive_process_failures ,
601+ frames_encoded : health_status . total_frames_encoded ,
602+ } ) ;
603603 }
604604 should_exit = false ;
605605 }
0 commit comments