From 423a5c12c404ded467f3eb37d794a1d7f21edfb6 Mon Sep 17 00:00:00 2001 From: Saxon Date: Sun, 29 Dec 2019 22:57:35 +1030 Subject: [PATCH] codec/mjpeg: renamed putBuffer.putBuf to putBytes --- codec/mjpeg/jpeg.go | 8 ++++---- codec/mjpeg/utils.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/codec/mjpeg/jpeg.go b/codec/mjpeg/jpeg.go index d1da4fcf..1b56efc3 100644 --- a/codec/mjpeg/jpeg.go +++ b/codec/mjpeg/jpeg.go @@ -263,7 +263,7 @@ func writeHeader(p *putBuffer, _type, width, height, nbqTab, dri int, qtable []b mark(p, codeAPP0) p.put16(16) const jfifLabel = "JFIF\000" - p.putBuf([]byte(jfifLabel)) + p.putBytes([]byte(jfifLabel)) p.put16(0x0201) p.put8(0) p.put16(1) @@ -287,7 +287,7 @@ func writeHeader(p *putBuffer, _type, width, height, nbqTab, dri int, qtable []b for i := 0; i < nbqTab; i++ { p.put8(uint8(i)) - p.putBuf(qtable[64*i : (64*i)+64]) + p.putBytes(qtable[64*i : (64*i)+64]) } // Define huffman table. @@ -360,8 +360,8 @@ func writeHuffman(p *putBuffer, class, id int, bits, values []byte) { n += int(bits[i]) } - p.putBuf(bits[1:17]) - p.putBuf(values[0:n]) + p.putBytes(bits[1:17]) + p.putBytes(values[0:n]) } // defaultQTable returns a default quantization table. diff --git a/codec/mjpeg/utils.go b/codec/mjpeg/utils.go index 12ff01ea..004b7903 100644 --- a/codec/mjpeg/utils.go +++ b/codec/mjpeg/utils.go @@ -58,7 +58,7 @@ func (p *putBuffer) put8(v uint8) { p.len++ } -func (p *putBuffer) putBuf(src []byte) { +func (p *putBuffer) putBytes(src []byte) { copy(p.bytes[p.len:], src) p.len += len(src) }