From f6f2998e85d739c6a78289d33f2fea10ae1e4503 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Sat, 2 Sep 2023 07:36:26 +0300 Subject: [PATCH] Fix JPEG screen length --- internal/mjpeg/init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/mjpeg/init.go b/internal/mjpeg/init.go index 588246e1..6cf10bf4 100644 --- a/internal/mjpeg/init.go +++ b/internal/mjpeg/init.go @@ -61,7 +61,7 @@ func handlerKeyframe(w http.ResponseWriter, r *http.Request) { h := w.Header() h.Set("Content-Type", "image/jpeg") - h.Set("Content-Length", strconv.Itoa(once.Len())) + h.Set("Content-Length", strconv.Itoa(len(b))) h.Set("Cache-Control", "no-cache") h.Set("Connection", "close") h.Set("Pragma", "no-cache")