ran go fmt on everything

This commit is contained in:
Saxon Milton 2018-04-16 14:24:21 +09:30
parent e3f5c14562
commit cad9078c17
1 changed files with 10 additions and 9 deletions

View File

@ -40,8 +40,8 @@ import (
"os"
"os/exec"
"strconv"
"time"
"sync"
"time"
"bitbucket.org/ausocean/av/generator"
"bitbucket.org/ausocean/av/parser"
@ -112,7 +112,7 @@ type revidInst struct {
getFrame func() []byte
sendClip func(clip []byte) error
rtmpInst rtmp.RTMPSession
mutex sync.Mutex
mutex sync.Mutex
}
// NewRevidInstance returns a pointer to a new revidInst with the desired
@ -267,12 +267,12 @@ func (r *revidInst) Stop() {
r.Log(Warning, "revidInst.Stop() called but revid not running!")
return
}
r.Log(Info, "Stopping revid!")
r.isRunning = false
// If a cmd process is running, we kill!
if r.cmd != nil && r.cmd.Process != nil {
r.cmd.Process.Kill()
}
r.Log(Info, "Stopping revid!")
r.isRunning = false
// If a cmd process is running, we kill!
if r.cmd != nil && r.cmd.Process != nil {
r.cmd.Process.Kill()
}
}
// getFrameNoPacketization gets a frame directly from the revid output chan
@ -357,7 +357,8 @@ 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 errorCount := 0, err := r.sendClip(clip); err != nil; errorCount++ {
errorCount := 0
for err := r.sendClip(clip); err != nil; errorCount++ {
if len(clip) >= 11 {
r.Log(Warning, "Send failed trying again!")
err = r.sendClip(clip)