diff --git a/protocol/rtcp/rtcp.go b/protocol/rtcp/rtcp.go index aedb57e7..1c9892bb 100644 --- a/protocol/rtcp/rtcp.go +++ b/protocol/rtcp/rtcp.go @@ -129,7 +129,7 @@ func (h Header) writeHeader(buf []byte, l int) { buf[0] = h.Version<<6 | asByte(h.Padding)<<5 | 0x1f&h.ReportCount buf[1] = h.Type binary.BigEndian.PutUint16(buf[2:], uint16(l)) - buf[4] = byte(h.SenderSSRC) + binary.BigEndian.PutUint32(buf[4:], h.SenderSSRC) } func asByte(b bool) byte { diff --git a/protocol/rtcp/rtcp_test.go b/protocol/rtcp/rtcp_test.go index 17ed8c5a..31588e53 100644 --- a/protocol/rtcp/rtcp_test.go +++ b/protocol/rtcp/rtcp_test.go @@ -41,6 +41,8 @@ func TestReceiverReportBytes(t *testing.T) { } got := report.Bytes() + t.Logf("Got: %v\n", got) + t.Logf("Want: %v\n", expect) if !bytes.Equal(got, expect) { t.Errorf("did not get expected result. \nGot: %v\nWant: %v\n", got, expect) }