From e8fd1a866110f5268e7f025070c20569210ea6dc Mon Sep 17 00:00:00 2001 From: Saxon Date: Sun, 29 Dec 2019 22:50:20 +1030 Subject: [PATCH] codec/mjpeg/jpeg.go: made JFIF header label local const --- codec/mjpeg/jpeg.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codec/mjpeg/jpeg.go b/codec/mjpeg/jpeg.go index dea764d6..0f240c5e 100644 --- a/codec/mjpeg/jpeg.go +++ b/codec/mjpeg/jpeg.go @@ -262,7 +262,8 @@ func writeHeader(p *putBuffer, _type, width, height, nbqTab, dri int, qtable []b // Write JFIF header. mark(p, codeAPP0) p.put16(16) - p.putBuf([]byte("JFIF\000")) + const jfifLabel = "JFIF\000" + p.putBuf([]byte(jfifLabel)) p.put16(0x0201) p.put8(0) p.put16(1)