revid: simplify syntax

This commit is contained in:
Trek H 2020-08-15 17:38:45 +09:30
parent e72ebe2f06
commit cca5582acb
1 changed files with 11 additions and 11 deletions

View File

@ -101,19 +101,19 @@ func httpSend(d []byte, client *netsender.Sender, log func(lvl int8, msg string,
log(logger.Debug, "making pins, and sending recv request", "ip", ip) log(logger.Debug, "making pins, and sending recv request", "ip", ip)
pins := netsender.MakePins(ip, "V,S") pins := netsender.MakePins(ip, "V,S")
for i, pin := range pins { for i, pin := range pins {
if pin.Name == "V0" || pin.Name == "S0" {
switch pin.Name { switch pin.Name {
case "V0": case "V0":
pins[i].MimeType = "video/mp2t" pins[i].MimeType = "video/mp2t"
case "S0": case "S0":
pins[i].MimeType = "audio/x-wav" pins[i].MimeType = "audio/x-wav"
default:
continue
} }
pins[i].Value = len(d) pins[i].Value = len(d)
pins[i].Data = d pins[i].Data = d
send = true send = true
break break
} }
}
if !send { if !send {
return nil return nil