codec/mjpeg/jpeg.go: simplified copy

This commit is contained in:
Saxon 2020-01-07 14:45:25 +10:30
parent fcb8f18e1f
commit 723166ec50
1 changed files with 1 additions and 3 deletions

View File

@ -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 {