瀏覽代碼

Fixed ffmpeg not ending bug

Toby Chui 1 年之前
父節點
當前提交
e70fc1693e
共有 1 個文件被更改,包括 1 次插入0 次删除
  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() {
 	go func() {
 		if _, err := io.Copy(w, stdout); err != nil {
 		if _, err := io.Copy(w, stdout); err != nil {
 			//End of video
 			//End of video
+			return
 		}
 		}
 	}()
 	}()