From 4834aa8ca2e4afc83cc56ea901ad97be9cec370f Mon Sep 17 00:00:00 2001 From: Saxon Date: Sat, 4 Jan 2020 13:53:04 +1030 Subject: [PATCH] codec/mjpeg/jpeg.go: don't need to set c.blen to 0 --- codec/mjpeg/jpeg.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/codec/mjpeg/jpeg.go b/codec/mjpeg/jpeg.go index d669e57d..10e53e58 100644 --- a/codec/mjpeg/jpeg.go +++ b/codec/mjpeg/jpeg.go @@ -251,9 +251,7 @@ func (c *Context) ParsePayload(p []byte, m bool) error { qLen = len(qTable) } - c.blen = 0 - - c.blen += writeHeader(c.buf[c.blen:], int(t), int(width), int(height), qLen/64, dri, qTable) + c.blen = writeHeader(c.buf[c.blen:], int(t), int(width), int(height), qLen/64, dri, qTable) } if c.blen == 0 {