mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +08:00
Merge branch 'main' into v4
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Package gortsplib is a RTSP 1.0 library for the Go programming language,
|
Package gortsplib is a RTSP 1.0 library for the Go programming language.
|
||||||
written for rtsp-simple-server.
|
|
||||||
|
|
||||||
Examples are available at https://github.com/bluenviron/gortsplib/tree/main/examples
|
Examples are available at https://github.com/bluenviron/gortsplib/tree/main/examples
|
||||||
*/
|
*/
|
||||||
@@ -10,6 +9,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -388,14 +388,17 @@ func (c *Client) Start(scheme string, host string) error {
|
|||||||
}
|
}
|
||||||
if c.OnTransportSwitch == nil {
|
if c.OnTransportSwitch == nil {
|
||||||
c.OnTransportSwitch = func(err error) {
|
c.OnTransportSwitch = func(err error) {
|
||||||
|
log.Println(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if c.OnPacketLost == nil {
|
if c.OnPacketLost == nil {
|
||||||
c.OnPacketLost = func(err error) {
|
c.OnPacketLost = func(err error) {
|
||||||
|
log.Println(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if c.OnDecodeError == nil {
|
if c.OnDecodeError == nil {
|
||||||
c.OnDecodeError = func(err error) {
|
c.OnDecodeError = func(err error) {
|
||||||
|
log.Println(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ package gortsplib
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -280,6 +281,8 @@ func (ss *ServerSession) onPacketLost(err error) {
|
|||||||
Session: ss,
|
Session: ss,
|
||||||
Error: err,
|
Error: err,
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
log.Println(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,6 +292,8 @@ func (ss *ServerSession) onDecodeError(err error) {
|
|||||||
Session: ss,
|
Session: ss,
|
||||||
Error: err,
|
Error: err,
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
log.Println(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user