Browse Source

Use bitwise AND operator in setPacketsLost

ognkrmms 1 year ago
parent
commit
d23ad4b4cc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/rtp.cpp

+ 1 - 1
src/rtp.cpp

@@ -171,7 +171,7 @@ void RtcpReportBlock::setSSRC(SSRC in_ssrc) { _ssrc = htonl(in_ssrc); }
 
 void RtcpReportBlock::setPacketsLost(uint8_t fractionLost,
                                      unsigned int packetsLostCount) {
-	_fractionLostAndPacketsLost = ((uint32_t)fractionLost << 24) && htonl(packetsLostCount);
+	_fractionLostAndPacketsLost = ((uint32_t)fractionLost << 24) & htonl(packetsLostCount);
 }
 
 uint8_t RtcpReportBlock::getFractionLost() const {