mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 06:46:42 +08:00
add OnTransportSwitch, OnPacketLost, OnDecodeError to server and client (#225)
These new hooks replace the generic hooks Log() and OnWarning().
This commit is contained in:
@@ -836,7 +836,7 @@ func TestServerPlayDecodeErrors(t *testing.T) {
|
||||
StatusCode: base.StatusOK,
|
||||
}, nil
|
||||
},
|
||||
onWarning: func(ctx *ServerHandlerOnWarningCtx) {
|
||||
onDecodeError: func(ctx *ServerHandlerOnDecodeErrorCtx) {
|
||||
switch {
|
||||
case ca.proto == "udp" && ca.name == "rtcp invalid":
|
||||
require.EqualError(t, ctx.Error, "rtcp: packet too short")
|
||||
|
Reference in New Issue
Block a user