diff --git a/codec/h265/lex_test.go b/codec/h265/lex_test.go index 67ba22cf..e68d1833 100644 --- a/codec/h265/lex_test.go +++ b/codec/h265/lex_test.go @@ -44,9 +44,9 @@ func (r *rtpReader) Read(p []byte) (int, error) { return 0, io.EOF } b := r.packets[r.idx] - copy(p, b) + n := copy(p, b) r.idx++ - return len(b), nil + return n, nil } // destination holds the access units extracted during the lexing process.