diff --git a/codec/h264/lex.go b/codec/h264/lex.go index 81eca759..b9a58ad2 100644 --- a/codec/h264/lex.go +++ b/codec/h264/lex.go @@ -269,8 +269,7 @@ func (l *RTPLexer) handleFUA(d []byte) { if end { panic("bad fragmentation packet") } - const FUIndicatorIdx = 0 - newHead := (d[FUIndicatorIdx] & 0xe0) | (d[FUHeadIdx] & 0x1f) + newHead := (d[0] & 0xe0) | (d[0] & 0x1f) d = d[1:] d[0] = newHead l.frag = true