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

gulp tidy

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