diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 90446364..1b6587dc 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -1270,10 +1270,10 @@ func rtmpSendPacket(r *C.RTMP, packet *C.RTMPPacket, queue int) int { if packet.m_nChannel >= r.m_channelsAllocatedOut { n := int(packet.m_nChannel + 10) - packets = C.realloc(unsafe.Pointer(r.m_vecChannelsOut), C.size_t( - unsafe.Sizeof(packet)*uintptr(n))) - //packets = realloc(unsafe.Pointer(r.m_vecChannelsOut), - //int(unsafe.Sizeof(packet)*uintptr(n))) + //packets = C.realloc(unsafe.Pointer(r.m_vecChannelsOut), C.size_t( + //unsafe.Sizeof(packet)*uintptr(n))) + packets = realloc(unsafe.Pointer(r.m_vecChannelsOut), + int(unsafe.Sizeof(packet)*uintptr(n))) if uintptr(packets) == uintptr(0) { //C.free(unsafe.Pointer(r.m_vecChannelsOut))