mirror of https://bitbucket.org/ausocean/av.git
Removed extra indentation using continue
This commit is contained in:
parent
3e9d7ef523
commit
fa7437cbd7
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue