mirror of https://bitbucket.org/ausocean/av.git
rtmp: use bool for m_bSendEncoding and m_bSendEncoding
This commit is contained in:
parent
b45f70bdf8
commit
b86ba9e49a
|
@ -418,7 +418,7 @@ func C_RTMP_Connect(r *C_RTMP, cp *C_RTMPPacket) (ok bool) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
r.m_bSendCounter = 1
|
r.m_bSendCounter = true
|
||||||
|
|
||||||
return C_RTMP_Connect1(r, cp)
|
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)
|
r.m_sb.sb_size -= int32(nRead)
|
||||||
nBytes = nRead
|
nBytes = nRead
|
||||||
r.m_nBytesIn += int32(nRead)
|
r.m_nBytesIn += int32(nRead)
|
||||||
if r.m_bSendCounter != 0 && r.m_nBytesIn > (r.m_nBytesInSent+
|
if r.m_bSendCounter && r.m_nBytesIn > (r.m_nBytesInSent+r.m_nClientBW/10) {
|
||||||
r.m_nClientBW/10) {
|
|
||||||
if !C_SendBytesReceived(r) {
|
if !C_SendBytesReceived(r) {
|
||||||
return 0
|
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)
|
enc = C_AMF_EncodeNamedNumber(enc, pend, av_objectEncoding, r.m_fEncoding)
|
||||||
if enc == nil {
|
if enc == nil {
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -196,8 +196,8 @@ type C_RTMP struct {
|
||||||
m_nClientBW int32
|
m_nClientBW int32
|
||||||
m_nClientBW2 uint8
|
m_nClientBW2 uint8
|
||||||
m_bPlaying bool
|
m_bPlaying bool
|
||||||
m_bSendEncoding uint8
|
m_bSendEncoding bool
|
||||||
m_bSendCounter uint8
|
m_bSendCounter bool
|
||||||
m_numInvokes int32
|
m_numInvokes int32
|
||||||
m_methodCalls []C_RTMP_METHOD
|
m_methodCalls []C_RTMP_METHOD
|
||||||
m_channelsAllocatedIn int32
|
m_channelsAllocatedIn int32
|
||||||
|
|
Loading…
Reference in New Issue