mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
fix crash
This commit is contained in:
parent
ebc201bda2
commit
a5723c4808
1 changed files with 4 additions and 2 deletions
|
|
@ -524,8 +524,10 @@ func (pa *path) externalCmdEnv() externalcmd.Environment {
|
|||
"RTSP_PORT": port,
|
||||
}
|
||||
|
||||
for i, ma := range pa.matches[1:] {
|
||||
env[strconv.FormatInt(int64(i+1), 10)] = ma
|
||||
if len(pa.matches) > 1 {
|
||||
for i, ma := range pa.matches[1:] {
|
||||
env[strconv.FormatInt(int64(i+1), 10)] = ma
|
||||
}
|
||||
}
|
||||
|
||||
return env
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue