ensuare onPacket is not nil in rtcpreader callback (#1390)
This commit is contained in:
@@ -22,7 +22,7 @@ func (r *RTCPReader) Write(p []byte) (n int, err error) {
|
|||||||
err = io.EOF
|
err = io.EOF
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if f, ok := r.onPacket.Load().(func([]byte)); ok {
|
if f, ok := r.onPacket.Load().(func([]byte)); ok && f != nil {
|
||||||
f(p)
|
f(p)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user