mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-26 04:52:00 -08:00
check SETUP mode when reading
This commit is contained in:
parent
a71bac5983
commit
a41c2fc67c
1 changed files with 5 additions and 0 deletions
|
|
@ -472,6 +472,11 @@ func (c *client) handleRequest(req *gortsplib.Request) error {
|
|||
switch c.state {
|
||||
// play
|
||||
case clientStateInitial, clientStatePrePlay:
|
||||
if th.Mode != nil && *th.Mode != "play" {
|
||||
c.writeResError(cseq, gortsplib.StatusBadRequest, fmt.Errorf("transport header must contain mode=play or not contain a mode"))
|
||||
return errRunTerminate
|
||||
}
|
||||
|
||||
pathConf, err := c.p.conf.checkPathNameAndFindConf(basePath)
|
||||
if err != nil {
|
||||
c.writeResError(cseq, gortsplib.StatusBadRequest, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue