mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-25 01:01:53 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user