support 'false' and 'true' values of 'encryption' parameter (#160)

This commit is contained in:
aler9 2020-12-19 20:04:17 +01:00
parent 98a443d22d
commit 939dda01d0

View file

@ -117,13 +117,13 @@ func (conf *Conf) fillAndCheck() error {
conf.Encryption = "no"
}
switch conf.Encryption {
case "no":
case "no", "false":
conf.EncryptionParsed = EncryptionNo
case "optional":
conf.EncryptionParsed = EncryptionOptional
case "yes":
case "yes", "true":
conf.EncryptionParsed = EncryptionYes
if _, ok := conf.ProtocolsParsed[gortsplib.StreamProtocolUDP]; ok {