mirror of https://bitbucket.org/ausocean/av.git
revid: improved error handling in revid.reset encoder/sender setup logic
This commit is contained in:
parent
89ba74004a
commit
b7ef1a1a2b
|
@ -195,16 +195,22 @@ func (r *Revid) reset(config Config) error {
|
|||
sender = newMtsSender(newMinimalHttpSender(r.ns, r.config.Logger.Log), nil)
|
||||
case Rtp:
|
||||
sender, err = newRtpSender(r.config.RtpAddress, r.config.Logger.Log, r.config.FrameRate)
|
||||
if err != nil {
|
||||
r.config.Logger.Log(logger.Warning, pkg+"rtp connect error", "error", err.Error())
|
||||
}
|
||||
case File:
|
||||
sender, err = newFileSender(r.config.OutputPath)
|
||||
case Rtmp:
|
||||
sender, _ = newRtmpSender(r.config.RtmpUrl, rtmpConnectionTimeout, rtmpConnectionMaxTries, r.config.Logger.Log)
|
||||
flvSenders = append(flvSenders, sender)
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
case Rtmp:
|
||||
sender, err = newRtmpSender(r.config.RtmpUrl, rtmpConnectionTimeout, rtmpConnectionMaxTries, r.config.Logger.Log)
|
||||
if err != nil {
|
||||
r.config.Logger.Log(logger.Warning, pkg+"rtmp connect error", "error", err.Error())
|
||||
}
|
||||
flvSenders = append(flvSenders, sender)
|
||||
continue
|
||||
}
|
||||
mtsSenders = append(mtsSenders, sender)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue