revid: do not double report returned error

This commit is contained in:
Dan Kortschak 2018-06-20 13:59:38 +09:30
parent 3a31812e0a
commit ec3eefeb37
1 changed files with 2 additions and 1 deletions

View File

@ -321,9 +321,10 @@ func (r *Revid) packClips() {
}
_, err := r.ringBuffer.Write(frame)
if err != nil {
r.Log(Error, err.Error())
if err == ring.ErrDropped {
r.Log(Warning, fmt.Sprintf("dropped %d byte frame", len(frame)))
} else {
r.Log(Error, err.Error())
}
}
packetCount++