From 5cb165d15f31b92165b1a7440041d9322fb2c6e7 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 17 Mar 2023 14:30:30 -0700 Subject: [PATCH] stream: don't die on stdout error --- stream.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stream.go b/stream.go index 53e7e658..8053f5e9 100644 --- a/stream.go +++ b/stream.go @@ -565,10 +565,10 @@ func (s *Stream) monitorTranscodeOutput(cmdStdOut io.ReadCloser, startAt float64 if len(line) == 0 { break } + } else if err != nil { + log.Println(err) + break } else { - if err != nil { - log.Fatal(err) - } line = line[:(len(line) - 1)] } @@ -631,10 +631,10 @@ func (s *Stream) monitorStderr(cmdStdErr io.ReadCloser) { if len(line) == 0 { break } + } else if err != nil { + log.Println(err) + break } else { - if err != nil { - log.Fatal(err) - } line = line[:(len(line) - 1)] } log.Println("ffmpeg-error:", string(line))