- fix the RTP SSRC - it was not converted to host byte order

This commit is contained in:
2025-07-23 08:36:23 +03:00
parent 8b33a3a7e6
commit 9dc59d5ed6

View File

@@ -78,9 +78,9 @@ bool RtpHelper::isRtcp(const void* buffer, size_t length)
unsigned RtpHelper::findSsrc(const void* buffer, size_t length) unsigned RtpHelper::findSsrc(const void* buffer, size_t length)
{ {
if (isRtp(buffer, length)) if (isRtp(buffer, length))
return reinterpret_cast<const RtpHeader*>(buffer)->ssrc; return ntohl(reinterpret_cast<const RtpHeader*>(buffer)->ssrc);
else else
return reinterpret_cast<const RtcpHeader*>(buffer)->ssrc; return ntohl(reinterpret_cast<const RtcpHeader*>(buffer)->ssrc);
} }
void RtpHelper::setSsrc(void* buffer, size_t length, uint32_t ssrc) void RtpHelper::setSsrc(void* buffer, size_t length, uint32_t ssrc)