Skip to content

Commit

Permalink
fix: panic due to invalid OPUS samples pushed to builder
Browse files Browse the repository at this point in the history
  • Loading branch information
prlanzarin committed Feb 19, 2024
1 parent 182c57d commit 346e517
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/webrtc/recorder/webm.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ func (r *WebmRecorder) pushOpus(p *rtp.Packet) {
r.m.Lock()
defer r.m.Unlock()

if len(p.Payload) == 0 || r.closed {
return
}

r.audioBuilder.Push(p)

for {
Expand Down

0 comments on commit 346e517

Please sign in to comment.