Skip to content

Commit

Permalink
Improvement to rtp-to-webrtc example
Browse files Browse the repository at this point in the history
  • Loading branch information
Tekunalogy authored and Sean-Der committed Jun 7, 2023
1 parent a0e9824 commit 4f1d46f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/rtp-to-webrtc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ func main() {
if err != nil {
panic(err)
}

// Increase the UDP receive buffer size
// Default UDP buffer sizes vary on different operating systems
bufferSize := 300000 // 300KB
err = listener.SetReadBuffer(bufferSize)
if err != nil {
panic(err)
}

defer func() {
if err = listener.Close(); err != nil {
panic(err)
Expand Down

0 comments on commit 4f1d46f

Please sign in to comment.