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>pull/4591/head
parent
68975a4db5
commit
590640cefb
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue