diff --git a/codec/mjpeg/jpeg.go b/codec/mjpeg/jpeg.go index 4d127bfc..6506fc39 100644 --- a/codec/mjpeg/jpeg.go +++ b/codec/mjpeg/jpeg.go @@ -278,7 +278,7 @@ func (c *Context) ParsePayload(p []byte, m bool) error { // TODO: could also check offset with how many bytes we currently have // to determine if there are missing frames. - // Write frame data + // Write frame data. rem := len(p) c.blen += copy(c.buf[c.blen:], p[idx:rem]) idx += rem @@ -312,7 +312,6 @@ func writeHeader(p []byte, _type, width, height, nbqTab int, dri uint16, qtable idx += 6 idx += copy(p[idx:], jfifLabel) - binary.BigEndian.PutUint16(p[idx:], jfifVer) p[idx+2] = jfifDensityUnit binary.BigEndian.PutUint16(p[idx+3:], jfifXDensity)