mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-24 20:11:56 -08:00
forbid runOnPublish when source is not record (#143)
This commit is contained in:
parent
41c1deda63
commit
40c2eb3da2
1 changed files with 4 additions and 0 deletions
|
|
@ -218,6 +218,10 @@ func (pconf *PathConf) fillAndCheck(name string) error {
|
|||
return fmt.Errorf("a path with a regular expression does not support option 'runOnInit'; use another path")
|
||||
}
|
||||
|
||||
if pconf.RunOnPublish != "" && pconf.Source != "record" {
|
||||
return fmt.Errorf("'runOnPublish' is useless when source is not 'record', since the stream is not provided by a publisher, but by another source")
|
||||
}
|
||||
|
||||
if pconf.RunOnDemandStartTimeout == 0 {
|
||||
pconf.RunOnDemandStartTimeout = 10 * time.Second
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue