mirror of https://bitbucket.org/ausocean/av.git
codec/mjpeg/jpeg.go: simplified copy
This commit is contained in:
parent
fcb8f18e1f
commit
723166ec50
|
@ -280,9 +280,7 @@ func (c *Context) ParsePayload(p []byte, m bool) error {
|
||||||
|
|
||||||
// Write frame data
|
// Write frame data
|
||||||
rem := len(p)
|
rem := len(p)
|
||||||
f := p[idx:rem]
|
c.blen += copy(c.buf[c.blen:], p[idx:rem])
|
||||||
copy(c.buf[c.blen:], f)
|
|
||||||
c.blen += len(f)
|
|
||||||
idx += rem
|
idx += rem
|
||||||
|
|
||||||
if m {
|
if m {
|
||||||
|
|
Loading…
Reference in New Issue