|
|
|
@ -252,6 +252,7 @@ func newProgram(args []string, stdin io.Reader) (*program, error) {
@@ -252,6 +252,7 @@ func newProgram(args []string, stdin io.Reader) (*program, error) {
|
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if _, ok := conf.protocolsParsed[gortsplib.StreamProtocolUdp]; ok { |
|
|
|
|
p.serverRtcp, err = newServerUdp(p, conf.RtcpPort, gortsplib.StreamTypeRtcp) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
@ -261,6 +262,7 @@ func newProgram(args []string, stdin io.Reader) (*program, error) {
@@ -261,6 +262,7 @@ func newProgram(args []string, stdin io.Reader) (*program, error) {
|
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for name, confp := range conf.Paths { |
|
|
|
|
if confp.RunOnInit != "" { |
|
|
|
@ -545,8 +547,11 @@ outer:
@@ -545,8 +547,11 @@ outer:
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
p.serverRtsp.close() |
|
|
|
|
|
|
|
|
|
if _, ok := p.conf.protocolsParsed[gortsplib.StreamProtocolUdp]; ok { |
|
|
|
|
p.serverRtcp.close() |
|
|
|
|
p.serverRtp.close() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for c := range p.clients { |
|
|
|
|
c.conn.NetConn().Close() |
|
|
|
|