mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-28 14:02:02 -08:00
update gortsplib
This commit is contained in:
parent
93ba061277
commit
b0208ad044
3 changed files with 6 additions and 12 deletions
2
go.mod
2
go.mod
|
|
@ -5,7 +5,7 @@ go 1.15
|
|||
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-20210314154849-d902b7da9320
|
||||
github.com/aler9/gortsplib v0.0.0-20210316101133-3a8c76e527e1
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||
|
|
|
|||
4
go.sum
4
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-20210314154849-d902b7da9320 h1:/WOt00YtNY2eWQy+MZ+LkkP7+XMviepr4yLCrK5PzhE=
|
||||
github.com/aler9/gortsplib v0.0.0-20210314154849-d902b7da9320/go.mod h1:aj4kDzanb3JZ46sFywWShcsnqqXTLE/3PNjwDhQZGM0=
|
||||
github.com/aler9/gortsplib v0.0.0-20210316101133-3a8c76e527e1 h1:7+0qt2CMGB57Oft4fBrPyeOeiFHxMAybfMCo4aX2+qE=
|
||||
github.com/aler9/gortsplib v0.0.0-20210316101133-3a8c76e527e1/go.mod h1:aj4kDzanb3JZ46sFywWShcsnqqXTLE/3PNjwDhQZGM0=
|
||||
github.com/aler9/rtmp v0.0.0-20210309202041-2d7177b7300d h1:LAX8pNvYpGgFpKdbPpEZWjNkHbmyvjMrT3vO7s7aaKU=
|
||||
github.com/aler9/rtmp v0.0.0-20210309202041-2d7177b7300d/go.mod h1:vzuE21rowz+lT1NGsWbreIvYulgBpCGnQyeTyFblUHc=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
|
|
|
|||
|
|
@ -271,12 +271,6 @@ func (c *Client) run() {
|
|||
|
||||
switch c.conn.State() {
|
||||
case gortsplib.ServerConnStateInitial, gortsplib.ServerConnStatePrePlay: // play
|
||||
if c.path != nil && reqPath != c.path.Name() {
|
||||
return &base.Response{
|
||||
StatusCode: base.StatusBadRequest,
|
||||
}, fmt.Errorf("path has changed, was '%s', now is '%s'", c.path.Name(), reqPath)
|
||||
}
|
||||
|
||||
resc := make(chan client.SetupPlayRes)
|
||||
c.parent.OnClientSetupPlay(client.SetupPlayReq{c, reqPath, req, resc}) //nolint:govet
|
||||
res := <-resc
|
||||
|
|
@ -557,7 +551,7 @@ func (c *Client) playStart() {
|
|||
c.path.OnClientPlay(client.PlayReq{c, resc}) //nolint:govet
|
||||
<-resc
|
||||
|
||||
tracksLen := len(c.conn.Tracks())
|
||||
tracksLen := len(c.conn.SetuppedTracks())
|
||||
|
||||
c.log(logger.Info, "is reading from path '%s', %d %s with %s",
|
||||
c.path.Name(),
|
||||
|
|
@ -589,7 +583,7 @@ func (c *Client) recordStart() {
|
|||
c.path.OnClientRecord(client.RecordReq{c, resc}) //nolint:govet
|
||||
<-resc
|
||||
|
||||
tracksLen := len(c.conn.Tracks())
|
||||
tracksLen := len(c.conn.SetuppedTracks())
|
||||
|
||||
c.log(logger.Info, "is publishing to path '%s', %d %s with %s",
|
||||
c.path.Name(),
|
||||
|
|
@ -618,7 +612,7 @@ func (c *Client) recordStop() {
|
|||
|
||||
// OnIncomingFrame implements path.Reader.
|
||||
func (c *Client) OnIncomingFrame(trackID int, streamType gortsplib.StreamType, buf []byte) {
|
||||
if !c.conn.HasTrack(trackID) {
|
||||
if _, ok := c.conn.SetuppedTracks()[trackID]; !ok {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue