codec/h265/lex_test.go: for rtpReader.Read() getting number of bytes read from copy and using that in return

This commit is contained in:
Saxon 2019-05-09 12:09:54 +09:30
parent e44d936315
commit ef16a82edb
1 changed files with 2 additions and 2 deletions

View File

@ -44,9 +44,9 @@ func (r *rtpReader) Read(p []byte) (int, error) {
return 0, io.EOF return 0, io.EOF
} }
b := r.packets[r.idx] b := r.packets[r.idx]
copy(p, b) n := copy(p, b)
r.idx++ r.idx++
return len(b), nil return n, nil
} }
// destination holds the access units extracted during the lexing process. // destination holds the access units extracted during the lexing process.