Skip to content

Include the header in ExtendedReport.MarshalSize - #229

Closed
RaphaelFakhri wants to merge 1 commit into
pion:mainfrom
RaphaelFakhri:fix-xr-marshalsize
Closed

RaphaelFakhri wants to merge 1 commit into
pion:mainfrom
RaphaelFakhri:fix-xr-marshalsize

Conversation

@RaphaelFakhri

Copy link
Copy Markdown

Include the header in ExtendedReport.MarshalSize

Description

ExtendedReport.MarshalSize returned wireSize(x), which excludes the 4-byte
RTCP header that Marshal writes. The result was 4 bytes smaller than the
marshaled packet, and CompoundPacket.MarshalSize was short by the same amount
for each extended report.

MarshalSize now adds headerLength, which matches the other packet types.

Tests

  • Added TestExtendedReportMarshalSize, which compares MarshalSize with the
    marshaled length for an ExtendedReport and for a CompoundPacket that
    contains one. It fails without the change (expected 208, actual 204) and
    passes with it.
  • go test -race ./... and golangci-lint run ./... pass.

@JoTurk JoTurk closed this Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants