diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 218bbb46..f4fe36e2 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -108,8 +108,8 @@ func byteSliceToCArr(buf []byte) *C.char { func (s *session) rtmpWrite(r *C.RTMP, buf []byte) int { var pkt *C.RTMPPacket = &r.m_write - size := len(buf) var enc unsafe.Pointer + size := len(buf) s2 := size var ret, num int @@ -186,8 +186,6 @@ func (s *session) rtmpWrite(r *C.RTMP, buf []byte) int { pkt.m_nBytesRead += C.uint(num) s2 -= num - - //buf += num buf = buf[num:] if pkt.m_nBytesRead == pkt.m_nBodySize {