File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ impl FFmpegHandler {
298298 let mut was_intentionally_stopped = false ;
299299 let mut recent_lines: VecDeque < String > = VecDeque :: with_capacity ( 40 ) ;
300300
301- for line in reader. lines ( ) . flatten ( ) {
301+ for line in reader. lines ( ) . map_while ( Result :: ok ) {
302302 // Check if process is still running (was it intentionally stopped?)
303303 {
304304 if let Ok ( stopping) = stopping_groups. lock ( ) {
@@ -557,7 +557,7 @@ impl FFmpegHandler {
557557 if let Some ( stderr) = child. stderr . take ( ) {
558558 thread:: spawn ( move || {
559559 let reader = BufReader :: new ( stderr) ;
560- for line in reader. lines ( ) . flatten ( ) {
560+ for line in reader. lines ( ) . map_while ( Result :: ok ) {
561561 if line. contains ( "[error]" ) || line. contains ( "[warning]" ) {
562562 log:: warn!( "[FFmpeg:relay] {line}" ) ;
563563 }
You can’t perform that action at this time.
0 commit comments