diff --git a/routes.go b/routes.go index 963f256..c50c9f2 100644 --- a/routes.go +++ b/routes.go @@ -205,6 +205,7 @@ func stream(lineup *lineup) gin.HandlerFunc { log.WithError(startErr).Errorln("Error starting ffmpeg") return } + defer run.Wait() go func() { scanner := bufio.NewScanner(stderr)