decode the configuration when decoding JSON

This commit is contained in:
aler9
2021-09-27 10:36:28 +02:00
committed by Alessandro Ros
parent 54292d712e
commit 6921a402d1
18 changed files with 532 additions and 285 deletions

View File

@@ -29,7 +29,7 @@ type rtspSourceParent interface {
type rtspSource struct {
ur string
proto *gortsplib.ClientProtocol
proto conf.SourceProtocol
anyPortEnable bool
fingerprint string
readTimeout conf.StringDuration
@@ -46,7 +46,7 @@ type rtspSource struct {
func newRTSPSource(
parentCtx context.Context,
ur string,
proto *gortsplib.ClientProtocol,
proto conf.SourceProtocol,
anyPortEnable bool,
fingerprint string,
readTimeout conf.StringDuration,
@@ -118,7 +118,7 @@ func (s *rtspSource) runInner() bool {
s.log(logger.Debug, "connecting")
client := &gortsplib.Client{
Protocol: s.proto,
Protocol: s.proto.ClientProtocol,
TLSConfig: &tls.Config{
InsecureSkipVerify: true,
VerifyConnection: func(cs tls.ConnectionState) error {