mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-05 08:16:55 +08:00
Fix writers for MJPEG and ASCII
This commit is contained in:
@@ -136,11 +136,13 @@ func (a *writer) Write(p []byte) (n int, err error) {
|
||||
|
||||
a.buf = append(a.buf, "\033[0m"...)
|
||||
|
||||
if n, err = a.wr.Write(a.buf); err == nil {
|
||||
a.wr.(http.Flusher).Flush()
|
||||
if _, err = a.wr.Write(a.buf); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return
|
||||
a.wr.(http.Flusher).Flush()
|
||||
|
||||
return len(p), nil
|
||||
}
|
||||
|
||||
func gray(r, g, b uint32, k float32) uint8 {
|
||||
|
Reference in New Issue
Block a user