Skip to content

Commit

Permalink
Fix buffer type assertion
Browse files Browse the repository at this point in the history
Fix buffer type assertion to set read dead line on
packetio Buffer
  • Loading branch information
OrlandoCo authored and tarrencev committed Jan 4, 2021
1 parent a14e41b commit 1c72ec6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stream_srtcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (r *ReadStreamSRTCP) Read(buf []byte) (int, error) {
// SetReadDeadline sets the deadline for the Read operation.
// Setting to zero means no deadline.
func (r *ReadStreamSRTCP) SetReadDeadline(t time.Time) error {
return r.buffer.SetReadDeadline(t)
return r.buffer.(*packetio.Buffer).SetReadDeadline(t)
}

// Close removes the ReadStream from the session and cleans up any associated state
Expand Down
2 changes: 1 addition & 1 deletion stream_srtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (r *ReadStreamSRTP) ReadRTP(buf []byte) (int, *rtp.Header, error) {
// SetReadDeadline sets the deadline for the Read operation.
// Setting to zero means no deadline.
func (r *ReadStreamSRTP) SetReadDeadline(t time.Time) error {
return r.buffer.SetReadDeadline(t)
return r.buffer.(*packetio.Buffer).SetReadDeadline(t)
}

// Close removes the ReadStream from the session and cleans up any associated state
Expand Down

0 comments on commit 1c72ec6

Please sign in to comment.