- compatibility with pcap++

This commit is contained in:
2023-04-09 15:46:33 +03:00
parent f01c5040e1
commit 5182cb8379
5 changed files with 30 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ project (helper_lib)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (USE_NULL_UUID OFF CACHE BOOL "When enabled linking to libuuid is avoided")
option (USE_NULL_UUID "When enabled linking to libuuid is avoided" OFF)
set (CMAKE_POSITION_INDEPENDENT_CODE ON)

View File

@@ -83,9 +83,9 @@ unsigned RtpHelper::findSsrc(const void* buffer, size_t length)
void RtpHelper::setSsrc(void* buffer, size_t length, uint32_t ssrc)
{
if (isRtp(buffer, length))
reinterpret_cast<RtpHeader*>(buffer)->ssrc = ssrc;
reinterpret_cast<RtpHeader*>(buffer)->ssrc = htonl(ssrc);
else
reinterpret_cast<RtcpHeader*>(buffer)->ssrc = ssrc;
reinterpret_cast<RtcpHeader*>(buffer)->ssrc = htonl(ssrc);
}
int RtpHelper::findPtype(const void* buffer, size_t length)