Fix MJPEG processing for wallpanel project #248

This commit is contained in:
Alexey Khit
2023-02-09 06:44:50 +03:00
parent 2e4b28d871
commit 6a40039645
+5 -1
View File
@@ -122,7 +122,11 @@ func (c *Client) startJPEG() error {
}
func (c *Client) startMJPEG(boundary string) error {
boundary = "--" + boundary
// some cameras add prefix to boundary header:
// https://github.com/TheTimeWalker/wallpanel-android
if !strings.HasPrefix(boundary, "--") {
boundary = "--" + boundary
}
r := bufio.NewReader(c.res.Body)
tp := textproto.NewReader(r)