mirror of https://bitbucket.org/ausocean/av.git
Fixing some reboot issues
This commit is contained in:
parent
a27b92ade8
commit
4ae6919cae
|
@ -357,17 +357,17 @@ func (r *revidInst) outputClips() {
|
|||
r.Log(Debug, fmt.Sprintf("Ring buffer size: %v\n", r.ringBuffer.GetNoOfElements()))
|
||||
// Output clip to the output specified in the configuration struct
|
||||
bytes += len(clip)
|
||||
for err := r.sendClip(clip); err != nil; {
|
||||
r.Log(Error, err.Error())
|
||||
if r.config.RtmpMethod == LibRtmp {
|
||||
reboot()
|
||||
}
|
||||
for errorCount := 0, err := r.sendClip(clip); err != nil; errorCount++ {
|
||||
if len(clip) >= 11 {
|
||||
r.Log(Warning, "Send failed trying again!")
|
||||
err = r.sendClip(clip)
|
||||
} else {
|
||||
break
|
||||
}
|
||||
r.Log(Error, err.Error())
|
||||
if r.config.RtmpMethod == LibRtmp && errorCount > 5 {
|
||||
reboot()
|
||||
}
|
||||
}
|
||||
// let the ringbuffer know that we're done with the memory we grabbed when
|
||||
// we call ringBuffer.Get()
|
||||
|
|
Loading…
Reference in New Issue