Skip to content

Commit

Permalink
Fix panic of rtx attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
cnderrauber committed Feb 5, 2024
1 parent d82b0d0 commit 987fb7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rtpreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ func (r *RTPReceiver) receiveForRtx(ssrc SSRC, rsid string, streamInfo *intercep
continue
}

if attributes == nil {
attributes = make(interceptor.Attributes)
}
attributes.Set(AttributeRtxPayloadType, b[1]&0x7F)
attributes.Set(AttributeRtxSequenceNumber, binary.BigEndian.Uint16(b[2:4]))
attributes.Set(AttributeRtxSsrc, binary.BigEndian.Uint32(b[8:12]))
Expand Down

0 comments on commit 987fb7a

Please sign in to comment.