From fa7437cbd7da0bc1c4f5ae2187368f8a31e12235 Mon Sep 17 00:00:00 2001 From: Saxon Milton Date: Mon, 16 Apr 2018 14:57:42 +0930 Subject: [PATCH] Removed extra indentation using continue --- revid/Revid.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/revid/Revid.go b/revid/Revid.go index c5f64fef..a0278484 100644 --- a/revid/Revid.go +++ b/revid/Revid.go @@ -302,23 +302,23 @@ func (r *revid) packClips() { r.Log(Error, err.Error()) r.Log(Warning, "Clearing output chan!") r.flushData() - } else { - for { - frame := r.getFrame() - lenOfFrame := len(frame) - upperBound := clipSize + lenOfFrame - copy(clip[clipSize:upperBound], frame) - packetCount++ - clipSize += lenOfFrame - if packetCount >= r.config.FramesPerClip { - if err := r.ringBuffer.DoneWriting(clipSize); err != nil { - r.Log(Error, err.Error()) - r.Log(Warning, "Dropping clip!") - } - clipSize = 0 - packetCount = 0 - break + continue + } + for { + frame := r.getFrame() + lenOfFrame := len(frame) + upperBound := clipSize + lenOfFrame + copy(clip[clipSize:upperBound], frame) + packetCount++ + clipSize += lenOfFrame + if packetCount >= r.config.FramesPerClip { + if err := r.ringBuffer.DoneWriting(clipSize); err != nil { + r.Log(Error, err.Error()) + r.Log(Warning, "Dropping clip!") } + clipSize = 0 + packetCount = 0 + break } } }