File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments