Commit f67e9fce by xiongziliang

修复访问悬垂指针的可能

parent e89caa23
...@@ -73,11 +73,6 @@ RtpProcess::RtpProcess(uint32_t ssrc) { ...@@ -73,11 +73,6 @@ RtpProcess::RtpProcess(uint32_t ssrc) {
} }
RtpProcess::~RtpProcess() { RtpProcess::~RtpProcess() {
DebugP(this);
if (_addr) {
delete _addr;
}
uint64_t duration = (_last_rtp_time.createdTime() - _last_rtp_time.elapsedTime()) / 1000; uint64_t duration = (_last_rtp_time.createdTime() - _last_rtp_time.elapsedTime()) / 1000;
WarnP(this) << "RTP推流器(" WarnP(this) << "RTP推流器("
<< _media_info._vhost << "/" << _media_info._vhost << "/"
...@@ -90,6 +85,11 @@ RtpProcess::~RtpProcess() { ...@@ -90,6 +85,11 @@ RtpProcess::~RtpProcess() {
if (_total_bytes > iFlowThreshold * 1024) { if (_total_bytes > iFlowThreshold * 1024) {
NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastFlowReport, _media_info, _total_bytes, duration, false, static_cast<SockInfo &>(*this)); NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastFlowReport, _media_info, _total_bytes, duration, false, static_cast<SockInfo &>(*this));
} }
if (_addr) {
delete _addr;
_addr = nullptr;
}
} }
bool RtpProcess::inputRtp(const Socket::Ptr &sock, const char *data, int data_len,const struct sockaddr *addr,uint32_t *dts_out) { bool RtpProcess::inputRtp(const Socket::Ptr &sock, const char *data, int data_len,const struct sockaddr *addr,uint32_t *dts_out) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论