From 26e3bd264aa135959f6548562b368edd3947421d Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Wed, 12 Sep 2018 11:04:33 +0930 Subject: [PATCH] rtmp: remove read type --- rtmp/rtmp.go | 12 ------------ rtmp/rtmp_headers.go | 13 ------------- 2 files changed, 25 deletions(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 00528432..41884394 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -1841,18 +1841,6 @@ func C_CloseInternal(r *C_RTMP, reconnect int32) { r.m_nBytesIn = 0 r.m_nBytesInSent = 0 - if r.m_read.flags&RTMP_READ_HEADER != 0 { - //C.free(unsafe.Pointer(r.m_read.buf)) - r.m_read.buf = nil - } - - r.m_read.dataType = 0 - r.m_read.flags = 0 - r.m_read.status = 0 - r.m_read.nResumeTS = 0 - r.m_read.nIgnoredFrameCounter = 0 - r.m_read.nIgnoredFlvFrameCounter = 0 - r.m_write.m_nBytesRead = 0 C_RTMPPacket_Free(&r.m_write) diff --git a/rtmp/rtmp_headers.go b/rtmp/rtmp_headers.go index e836a49d..bca27012 100644 --- a/rtmp/rtmp_headers.go +++ b/rtmp/rtmp_headers.go @@ -174,18 +174,6 @@ type C_RTMP_LNK struct { port uint16 } -// typedef struct RTMP_READ -// rtmp.h +200 -type C_RTMP_READ struct { - buf *byte - dataType uint8 - flags uint8 - status int8 - nResumeTS uint32 - nIgnoredFrameCounter uint32 - nIgnoredFlvFrameCounter uint32 -} - // typedef struct RTMPMethod // rtmp.h +231 type C_RTMP_METHOD struct { @@ -226,7 +214,6 @@ type C_RTMP struct { m_msgCounter int32 m_resplen int32 m_unackd int32 - m_read C_RTMP_READ m_write C_RTMPPacket m_sb C_RTMPSockBuf Link C_RTMP_LNK