trying to fix mem problem

This commit is contained in:
Saxon1 2018-05-03 14:28:14 +09:30
parent ea0ee8fc08
commit 03a919dd0c
1 changed files with 2 additions and 0 deletions

View File

@ -382,6 +382,7 @@ func (r *revid) outputClips() {
r.Log(Debug,"About to send!")
err2 := r.sendClip(clip)
r.Log(Debug,"Finished send!")
for ; err2 != nil; errorCount++ {
r.Log(Warning, "Send failed trying again!")
// If the clip size is not bigger than the threshold then we classify
@ -402,6 +403,7 @@ func (r *revid) outputClips() {
r.Log(Error, err2.Error())
if r.config.Output == NativeRtmp && errorCount > 10 {
r.rtmpInst.EndSession()
r.rtmpInst = rtmp.NewRTMPSession(r.config.RtmpUrl, rtmpConnectionTimout)
err = r.rtmpInst.StartSession()
}
}