rtsp source: log decode errors

This commit is contained in:
aler9 2022-10-31 19:10:32 +01:00
parent e379bc5213
commit 584cc9357a
3 changed files with 6 additions and 3 deletions

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.18
require (
code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5
github.com/abema/go-mp4 v0.8.0
github.com/aler9/gortsplib v0.0.0-20221028142718-363ed386255a
github.com/aler9/gortsplib v0.0.0-20221031175129-0e6a0b8b25db
github.com/asticode/go-astits v1.10.1-0.20220319093903-4abe66a9b757
github.com/fsnotify/fsnotify v1.4.9
github.com/gin-gonic/gin v1.8.1

4
go.sum
View File

@ -6,8 +6,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/aler9/gortsplib v0.0.0-20221028142718-363ed386255a h1:xRT/qvLg7Yh8CmyiRUKDID0CYxrBELwyNhx4+3HEL0U=
github.com/aler9/gortsplib v0.0.0-20221028142718-363ed386255a/go.mod h1:BOWNZ/QBkY/eVcRqUzJbPFEsRJshwxaxBT01K260Jeo=
github.com/aler9/gortsplib v0.0.0-20221031175129-0e6a0b8b25db h1:CSIV4VjbXkheBcUjtqD2odV5qYneKxiNccNeFkEDG3k=
github.com/aler9/gortsplib v0.0.0-20221031175129-0e6a0b8b25db/go.mod h1:BOWNZ/QBkY/eVcRqUzJbPFEsRJshwxaxBT01K260Jeo=
github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82 h1:9WgSzBLo3a9ToSVV7sRTBYZ1GGOZUpq4+5H3SN0UZq4=
github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82/go.mod h1:qsMrZCbeBf/mCLOeF16KDkPu4gktn/pOWyaq1aYQE7U=
github.com/asticode/go-astikit v0.20.0 h1:+7N+J4E4lWx2QOkRdOf6DafWJMv6O4RRfgClwQokrH8=

View File

@ -97,6 +97,9 @@ func (s *rtspSource) run(ctx context.Context) error {
OnResponse: func(res *base.Response) {
s.Log(logger.Debug, "s->c %v", res)
},
OnDecodeError: func(err error) {
s.Log(logger.Warn, "%v", err)
},
}
u, err := url.Parse(s.ur)