mirror of https://bitbucket.org/ausocean/av.git
rtmp: remove http-specific code
This commit is contained in:
parent
5203982233
commit
ac15477af1
19
rtmp/rtmp.go
19
rtmp/rtmp.go
|
@ -1427,19 +1427,13 @@ func C_RTMP_SendPacket(r *C_RTMP, packet *C_RTMPPacket, queue int) (ok bool) {
|
|||
log.Printf("C_RTMP_SendPacket: fd=%v, size=%v", r.m_sb.sb_socket, nSize)
|
||||
}
|
||||
|
||||
var tbuf, toff *byte
|
||||
for (nSize + hSize) != 0 {
|
||||
if nSize < nChunkSize {
|
||||
nChunkSize = nSize
|
||||
}
|
||||
|
||||
if tbuf != nil {
|
||||
copy(pl2b(toff, nChunkSize+hSize), pl2b(header, nChunkSize+hSize))
|
||||
toff = incBytePtr(toff, nChunkSize+hSize)
|
||||
} else {
|
||||
if !C_WriteN(r, pl2b(header, nChunkSize+hSize)) {
|
||||
return false
|
||||
}
|
||||
if !C_WriteN(r, pl2b(header, nChunkSize+hSize)) {
|
||||
return false
|
||||
}
|
||||
|
||||
nSize -= nChunkSize
|
||||
|
@ -1477,15 +1471,6 @@ func C_RTMP_SendPacket(r *C_RTMP, packet *C_RTMPPacket, queue int) (ok bool) {
|
|||
}
|
||||
}
|
||||
|
||||
if tbuf != nil {
|
||||
ok := C_WriteN(r, pp2b(tbuf, toff))
|
||||
tbuf = nil
|
||||
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// We invoked a remote method
|
||||
// TODO: port the const
|
||||
if packet.m_packetType == RTMP_PACKET_TYPE_INVOKE {
|
||||
|
|
Loading…
Reference in New Issue