提交 6b0374ef authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

gulp tidy

上级 15e77ee9
......@@ -55,7 +55,7 @@ namespace RTC
RTC::UdpSocket* udpSocket{ nullptr };
RTC::TransportTuple* tuple{ nullptr };
// Others.
struct sockaddr_storage remoteAddrStorage;
struct sockaddr_storage remoteAddrStorage{};
};
} // namespace RTC
......
......@@ -98,7 +98,7 @@ protected:
size_t bufferDataLen{ 0 };
std::string localIP;
uint16_t localPort{ 0 };
struct sockaddr_storage peerAddr;
struct sockaddr_storage peerAddr{};
std::string peerIP;
uint16_t peerPort{ 0 };
};
......
......@@ -56,7 +56,7 @@ private:
bool isClosing{ false };
protected:
struct sockaddr_storage localAddr;
struct sockaddr_storage localAddr{};
std::string localIP;
uint16_t localPort{ 0 };
};
......
......@@ -62,7 +62,7 @@ private:
bool isClosing{ false };
protected:
struct sockaddr_storage localAddr;
struct sockaddr_storage localAddr{};
std::string localIP;
uint16_t localPort{ 0 };
};
......
......@@ -83,18 +83,16 @@ namespace RTC
return true;
}
// Out of order packet or already handled NACKed packet.
else
{
MS_DEBUG_TAG(
rtx,
"ignoring out of order packet or already handled NACKed packet [ssrc:%" PRIu32
", seq:%" PRIu16 "]",
packet->GetSsrc(),
packet->GetSequenceNumber());
MS_DEBUG_TAG(
rtx,
"ignoring out of order packet or already handled NACKed packet [ssrc:%" PRIu32
", seq:%" PRIu16 "]",
packet->GetSsrc(),
packet->GetSequenceNumber());
return false;
}
return false;
}
// Otherwise we may have lost some packets.
......
......@@ -79,7 +79,7 @@ namespace RTC
delete this->tuple;
if (this->udpSocket)
if (this->udpSocket != nullptr)
this->udpSocket->Destroy();
}
......@@ -170,7 +170,7 @@ namespace RTC
}
}
inline void PlainRtpTransport::OnRtpDataRecv(RTC::TransportTuple* tuple, const uint8_t* data, size_t len)
inline void PlainRtpTransport::OnRtpDataRecv(RTC::TransportTuple* /*tuple*/, const uint8_t* data, size_t len)
{
MS_TRACE();
......@@ -219,7 +219,7 @@ namespace RTC
}
inline void PlainRtpTransport::OnRtcpDataRecv(
RTC::TransportTuple* tuple, const uint8_t* data, size_t len)
RTC::TransportTuple* /*tuple*/, const uint8_t* data, size_t len)
{
MS_TRACE();
......
......@@ -738,7 +738,7 @@ namespace RTC
{
MS_TRACE();
auto rtpStreamRecv = static_cast<RtpStreamRecv*>(rtpStream);
auto rtpStreamRecv = dynamic_cast<RtpStreamRecv*>(rtpStream);
MS_ASSERT(
this->mapRtpStreamProfiles.find(rtpStreamRecv) != this->mapRtpStreamProfiles.end(),
......@@ -754,7 +754,7 @@ namespace RTC
{
MS_TRACE();
auto rtpStreamRecv = static_cast<RtpStreamRecv*>(rtpStream);
auto rtpStreamRecv = dynamic_cast<RtpStreamRecv*>(rtpStream);
MS_ASSERT(
this->mapRtpStreamProfiles.find(rtpStreamRecv) != this->mapRtpStreamProfiles.end(),
......@@ -770,7 +770,7 @@ namespace RTC
{
MS_TRACE();
auto rtpStreamRecv = static_cast<RtpStreamRecv*>(rtpStream);
auto rtpStreamRecv = dynamic_cast<RtpStreamRecv*>(rtpStream);
MS_ASSERT(
this->mapRtpStreamProfiles.find(rtpStreamRecv) != this->mapRtpStreamProfiles.end(),
......
......@@ -128,14 +128,10 @@ namespace RTC
SdesItem* item = SdesItem::Parse(data + offset, len - offset);
if (item == nullptr)
{
break;
}
else
{
chunk->AddItem(item);
offset += item->GetSize();
}
chunk->AddItem(item);
offset += item->GetSize();
}
return chunk.release();
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论