mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 07:37:07 +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:
@@ -52,7 +52,7 @@ func (sf *serverSessionFormat) stop() {
|
||||
func (sf *serverSessionFormat) readRTPUDP(pkt *rtp.Packet, now time.Time) {
|
||||
packets, missing := sf.udpReorderer.Process(pkt)
|
||||
if missing != 0 {
|
||||
onWarning(sf.sm.ss, fmt.Errorf("%d RTP packet(s) lost", missing))
|
||||
sf.sm.ss.onPacketLost(fmt.Errorf("%d RTP packet(s) lost", missing))
|
||||
// do not return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user