diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 5fd8a48e..5038ccf1 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -418,7 +418,7 @@ func C_RTMP_Connect(r *C_RTMP, cp *C_RTMPPacket) (ok bool) { return false } - r.m_bSendCounter = 1 + r.m_bSendCounter = true return C_RTMP_Connect1(r, cp) } @@ -596,8 +596,7 @@ func C_ReadN(r *C_RTMP, buffer *byte, n int) int { r.m_sb.sb_size -= int32(nRead) nBytes = nRead r.m_nBytesIn += int32(nRead) - if r.m_bSendCounter != 0 && r.m_nBytesIn > (r.m_nBytesInSent+ - r.m_nClientBW/10) { + if r.m_bSendCounter && r.m_nBytesIn > (r.m_nBytesInSent+r.m_nClientBW/10) { if !C_SendBytesReceived(r) { return 0 } @@ -740,7 +739,7 @@ func C_SendConnectPacket(r *C_RTMP, cp *C_RTMPPacket) (ok bool) { } } - if r.m_fEncoding != 0.0 || r.m_bSendEncoding != 0 { + if r.m_fEncoding != 0.0 || r.m_bSendEncoding { enc = C_AMF_EncodeNamedNumber(enc, pend, av_objectEncoding, r.m_fEncoding) if enc == nil { return false diff --git a/rtmp/rtmp_headers.go b/rtmp/rtmp_headers.go index 55f8208c..69f634f6 100644 --- a/rtmp/rtmp_headers.go +++ b/rtmp/rtmp_headers.go @@ -196,8 +196,8 @@ type C_RTMP struct { m_nClientBW int32 m_nClientBW2 uint8 m_bPlaying bool - m_bSendEncoding uint8 - m_bSendCounter uint8 + m_bSendEncoding bool + m_bSendCounter bool m_numInvokes int32 m_methodCalls []C_RTMP_METHOD m_channelsAllocatedIn int32