mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
server: do not allow a client to change path name during PLAY or RECORD
This commit is contained in:
@@ -238,3 +238,14 @@ type ErrServerInvalidSession struct{}
|
||||
func (e ErrServerInvalidSession) Error() string {
|
||||
return "invalid session"
|
||||
}
|
||||
|
||||
// ErrServerPathHasChanged is an error that can be returned by a server.
|
||||
type ErrServerPathHasChanged struct {
|
||||
Prev string
|
||||
Cur string
|
||||
}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e ErrServerPathHasChanged) Error() string {
|
||||
return fmt.Sprintf("path has changed, was '%s', now is '%s'", e.Prev, e.Cur)
|
||||
}
|
||||
|
Reference in New Issue
Block a user