From 5b8f71b7d8dea379882d1b84dba952954aab5664 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 582594ec..52d68418 100644 --- a/codec/mjpeg/jpeg.go +++ b/codec/mjpeg/jpeg.go @@ -264,7 +264,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) @@ -288,7 +288,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. @@ -361,8 +361,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) }