From e44d9363154af943450912046298ec1a4da7c6fb Mon Sep 17 00:00:00 2001 From: Saxon Date: Thu, 9 May 2019 12:07:46 +0930 Subject: [PATCH] codec/h265: got rid of _d in handleFragmentation --- codec/h265/lex.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/codec/h265/lex.go b/codec/h265/lex.go index cf65b3fe..06b7dcb2 100644 --- a/codec/h265/lex.go +++ b/codec/h265/lex.go @@ -147,24 +147,24 @@ func (l *Lexer) handleAggregation(d []byte) { // handleFragmentation parses NAL units from fragmentation packets and writes // them to the Lexer's buf. func (l *Lexer) handleFragmentation(d []byte) { - _d := d[3:] - if l.donl { - _d = d[5:] - } - // Get start and end indiciators from FU header. start := d[2]&0x80 != 0 end := d[2]&0x40 != 0 + d = d[3:] + if l.donl { + d = d[2:] + } + switch { case start && !end: l.frag = true - l.writeWithPrefix(_d) + l.writeWithPrefix(d) case !start && end: l.frag = false fallthrough case !start && !end: - l.writeNoPrefix(_d) + l.writeNoPrefix(d) default: panic("bad fragmentation packet") }