packetnet
packetnet copied to clipboard
fix RtpPacket and RtcpPacket bitmask setter logic
The PayloadType setter uses header[offset] |= value & bitmask
to set the value.
However this only sets the bits in the new value, it does not unset existing bits not in the value. While the setter works when the current header byte is zero, it fails if the RTP header already has a payload type value to be changed.
The same bug also appears to affect ReceptionReportCount and CsrcCount.