mirror of https://bitbucket.org/ausocean/av.git
Using my realloc - tested and working
This commit is contained in:
parent
e059095c74
commit
357bf4c87b
|
@ -1270,10 +1270,10 @@ func rtmpSendPacket(r *C.RTMP, packet *C.RTMPPacket, queue int) int {
|
||||||
|
|
||||||
if packet.m_nChannel >= r.m_channelsAllocatedOut {
|
if packet.m_nChannel >= r.m_channelsAllocatedOut {
|
||||||
n := int(packet.m_nChannel + 10)
|
n := int(packet.m_nChannel + 10)
|
||||||
packets = C.realloc(unsafe.Pointer(r.m_vecChannelsOut), C.size_t(
|
//packets = C.realloc(unsafe.Pointer(r.m_vecChannelsOut), C.size_t(
|
||||||
unsafe.Sizeof(packet)*uintptr(n)))
|
//unsafe.Sizeof(packet)*uintptr(n)))
|
||||||
//packets = realloc(unsafe.Pointer(r.m_vecChannelsOut),
|
packets = realloc(unsafe.Pointer(r.m_vecChannelsOut),
|
||||||
//int(unsafe.Sizeof(packet)*uintptr(n)))
|
int(unsafe.Sizeof(packet)*uintptr(n)))
|
||||||
|
|
||||||
if uintptr(packets) == uintptr(0) {
|
if uintptr(packets) == uintptr(0) {
|
||||||
//C.free(unsafe.Pointer(r.m_vecChannelsOut))
|
//C.free(unsafe.Pointer(r.m_vecChannelsOut))
|
||||||
|
|
Loading…
Reference in New Issue