mirror of https://bitbucket.org/ausocean/av.git
codec/mjpeg/jpeg.go: don't need to convert jfifLabel string to []byte for copy
This commit is contained in:
parent
38c4972a76
commit
4325b86a99
|
@ -305,9 +305,8 @@ func writeHeader(p []byte, _type, width, height, nbqTab int, dri uint16, qtable
|
||||||
binary.BigEndian.PutUint16(p[idx+4:], jfifHeadLen)
|
binary.BigEndian.PutUint16(p[idx+4:], jfifHeadLen)
|
||||||
idx += 6
|
idx += 6
|
||||||
|
|
||||||
src := []byte(jfifLabel)
|
copy(p[idx:], jfifLabel)
|
||||||
copy(p[idx:], src)
|
idx += len(jfifLabel)
|
||||||
idx += len(src)
|
|
||||||
|
|
||||||
binary.BigEndian.PutUint16(p[idx:], jfifVer)
|
binary.BigEndian.PutUint16(p[idx:], jfifVer)
|
||||||
p[idx+2] = jfifDensityUnit
|
p[idx+2] = jfifDensityUnit
|
||||||
|
|
Loading…
Reference in New Issue