diff --git a/go.mod b/go.mod index e790d042..2826497e 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect - github.com/aler9/gortsplib v0.0.0-20210724151831-dae5a1f04033 + github.com/aler9/gortsplib v0.0.0-20210731192657-45db8582b0b3 github.com/asticode/go-astits v1.9.0 github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.4.9 diff --git a/go.sum b/go.sum index 563c07b9..2a65f2fd 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,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-20210724151831-dae5a1f04033 h1:Bf0hzdN1jUWsb5Mzezq1pd18EIBeKXxk5clIpHZJ1Lk= -github.com/aler9/gortsplib v0.0.0-20210724151831-dae5a1f04033/go.mod h1:s5FsbPRxJhU/YedvUKAKHVY+lQEdYsiJpuN2CHb89cI= +github.com/aler9/gortsplib v0.0.0-20210731192657-45db8582b0b3 h1:OHLssJ39nrj8ln6xBJz3529c2In8cXhfptpvvw1bwDc= +github.com/aler9/gortsplib v0.0.0-20210731192657-45db8582b0b3/go.mod h1:s5FsbPRxJhU/YedvUKAKHVY+lQEdYsiJpuN2CHb89cI= github.com/aler9/rtmp v0.0.0-20210403095203-3be4a5535927 h1:95mXJ5fUCYpBRdSOnLAQAdJHHKxxxJrVCiaqDi965YQ= github.com/aler9/rtmp v0.0.0-20210403095203-3be4a5535927/go.mod h1:vzuE21rowz+lT1NGsWbreIvYulgBpCGnQyeTyFblUHc= github.com/asticode/go-astikit v0.20.0 h1:+7N+J4E4lWx2QOkRdOf6DafWJMv6O4RRfgClwQokrH8= diff --git a/internal/core/rtsp_session.go b/internal/core/rtsp_session.go index 951bf838..07e01725 100644 --- a/internal/core/rtsp_session.go +++ b/internal/core/rtsp_session.go @@ -228,12 +228,6 @@ func (s *rtspSession) OnPlay(ctx *gortsplib.ServerHandlerOnPlayCtx) (*base.Respo h := make(base.Header) if s.ss.State() == gortsplib.ServerSessionStatePrePlay { - if ctx.Path != s.path.Name() { - return &base.Response{ - StatusCode: base.StatusBadRequest, - }, fmt.Errorf("path has changed, was '%s', now is '%s'", s.path.Name(), ctx.Path) - } - s.path.OnReaderPlay(pathReaderPlayReq{Author: s}) if s.path.Conf().RunOnRead != "" { @@ -253,12 +247,6 @@ func (s *rtspSession) OnPlay(ctx *gortsplib.ServerHandlerOnPlayCtx) (*base.Respo // OnRecord is called by rtspServer. func (s *rtspSession) OnRecord(ctx *gortsplib.ServerHandlerOnRecordCtx) (*base.Response, error) { - if ctx.Path != s.path.Name() { - return &base.Response{ - StatusCode: base.StatusBadRequest, - }, fmt.Errorf("path has changed, was '%s', now is '%s'", s.path.Name(), ctx.Path) - } - res := s.path.OnPublisherRecord(pathPublisherRecordReq{Author: s}) if res.Err != nil { return &base.Response{