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
|
||||
rem := len(p)
|
||||
f := p[idx:rem]
|
||||
copy(c.buf[c.blen:], f)
|
||||
c.blen += len(f)
|
||||
c.blen += copy(c.buf[c.blen:], p[idx:rem])
|
||||
idx += rem
|
||||
|
||||
if m {
|
||||
|
|
Loading…
Reference in New Issue