fix: correct NTP timestamp type truncation in RtpCtrlThread

The NTP timestamp fields ntpSecN and ntpFracN are defined as uint32_t
in the RtcpPacket struct, but were being assigned to uint16_t local
variables, truncating the upper 16 bits.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Isaac Connor
2026-02-03 12:34:21 -05:00
parent 68975a4db5
commit 590640cefb

View File

@@ -67,8 +67,8 @@ int RtpCtrlThread::recvPacket( const unsigned char *packet, ssize_t packetLen )
if ( len > 1 ) {
//printf( "NTPts:%d.%d, RTPts:%d\n", $ntptsmsb, $ntptslsb, $rtpts );
uint16_t ntptsmsb = ntohl(rtcpPacket->body.sr.ntpSecN);
uint16_t ntptslsb = ntohl(rtcpPacket->body.sr.ntpFracN);
uint32_t ntptsmsb = ntohl(rtcpPacket->body.sr.ntpSecN);
uint32_t ntptslsb = ntohl(rtcpPacket->body.sr.ntpFracN);
//printf( "NTPts:%x.%04x, RTPts:%x\n", $ntptsmsb, $ntptslsb, $rtpts );
//printf( "Pkts:$sendpkts, Octs:$sendocts\n" );
uint32_t rtpTime = ntohl(rtcpPacket->body.sr.rtpTsN);