fix a stupid code

This commit is contained in:
xtaci
2016-08-16 11:30:24 +08:00
parent 4e6099ba95
commit 32c56eed97
+1 -2
View File
@@ -78,8 +78,7 @@ func (fec *FEC) decode(data []byte) fecPacket {
pkt.ts = currentMs()
// allocate memory & copy
buf := fec.xmitBuf.Get().([]byte)
copy(buf, data[6:])
n := len(data[6:])
n := copy(buf, data[6:])
xorBytes(buf[n:], buf[n:], buf[n:])
pkt.data = buf
return pkt