From 35087e08124aa9b839e009ed38711a6b542c0aaa Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Sun, 16 Apr 2023 14:48:26 +0300 Subject: [PATCH] Remove mutex from MP4 --- cmd/mp4/mp4.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/mp4/mp4.go b/cmd/mp4/mp4.go index 6f3fa1f7..0db0c004 100644 --- a/cmd/mp4/mp4.go +++ b/cmd/mp4/mp4.go @@ -4,7 +4,6 @@ import ( "net/http" "strconv" "strings" - "sync" "time" "github.com/AlexxIT/go2rtc/cmd/api" @@ -116,11 +115,8 @@ func handlerMP4(w http.ResponseWriter, r *http.Request) { Medias: core.ParseQuery(r.URL.Query()), } - mu := &sync.Mutex{} cons.Listen(func(msg any) { if data, ok := msg.([]byte); ok { - mu.Lock() - defer mu.Unlock() if _, err := w.Write(data); err != nil && exit != nil { select { case exit <- err: