Sfoglia il codice sorgente

Fixed ffmpeg not ending bug

Toby Chui 1 anno fa
parent
commit
e70fc1693e
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      mod/media/transcoder/transcoder.go

+ 1 - 0
mod/media/transcoder/transcoder.go

@@ -73,6 +73,7 @@ func TranscodeAndStream(w http.ResponseWriter, r *http.Request, inputFile string
 	go func() {
 		if _, err := io.Copy(w, stdout); err != nil {
 			//End of video
+			return
 		}
 	}()