Skip to content

fix RtpPacket and RtcpPacket bitmask setter logic#209

Merged
PhyxionNL merged 1 commit intodotpcap:masterfrom
SteveAyre:bugfix/rtp-rtcp-bitmask-setter
Aug 4, 2024
Merged

fix RtpPacket and RtcpPacket bitmask setter logic#209
PhyxionNL merged 1 commit intodotpcap:masterfrom
SteveAyre:bugfix/rtp-rtcp-bitmask-setter

Conversation

@SteveAyre
Copy link
Copy Markdown
Contributor

@SteveAyre SteveAyre commented Jun 18, 2024

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.

previous logic only worked on zeroed data, it could not update existing packets
@PhyxionNL PhyxionNL merged commit 7ca0301 into dotpcap:master Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants