mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-11 01:07:40 +00:00
externalcmd: fix crash when manually pushing to an ondemand path
This commit is contained in:
parent
b65207012c
commit
450acfaf4e
@ -518,9 +518,11 @@ func (pa *path) onDemandCloseSource() {
|
||||
pa.source.(sourceStatic).Close()
|
||||
pa.source = nil
|
||||
} else {
|
||||
if pa.onDemandCmd != nil {
|
||||
pa.Log(logger.Info, "on demand command stopped")
|
||||
pa.onDemandCmd.Close()
|
||||
pa.onDemandCmd = nil
|
||||
}
|
||||
|
||||
if pa.source != nil {
|
||||
pa.source.(publisher).Close()
|
||||
|
Loading…
Reference in New Issue
Block a user