mirror of https://bitbucket.org/ausocean/av.git
revid: removed redundant error logging
This commit is contained in:
parent
ae34ebe368
commit
eacbfb9ee3
|
@ -48,6 +48,8 @@ import (
|
||||||
"bitbucket.org/ausocean/utils/ring"
|
"bitbucket.org/ausocean/utils/ring"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var ()
|
||||||
|
|
||||||
// Misc constants
|
// Misc constants
|
||||||
const (
|
const (
|
||||||
clipDuration = 1 * time.Second
|
clipDuration = 1 * time.Second
|
||||||
|
@ -140,8 +142,7 @@ func (p *packer) Write(frame []byte) (int, error) {
|
||||||
p.owner.config.Logger.Log(logger.Warning, pkg+"dropped frame", "frame size", len(frame))
|
p.owner.config.Logger.Log(logger.Warning, pkg+"dropped frame", "frame size", len(frame))
|
||||||
return len(frame), nil
|
return len(frame), nil
|
||||||
}
|
}
|
||||||
p.owner.config.Logger.Log(logger.Error, pkg+"unexpected ring buffer write error", "error", err.Error())
|
return n, errors.New(pkg + "unexpected ring buffer write error: " + err.Error())
|
||||||
return n, err
|
|
||||||
}
|
}
|
||||||
p.packetCount++
|
p.packetCount++
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
|
@ -470,7 +471,6 @@ func (r *Revid) setupInputForFile() error {
|
||||||
delay := time.Second / time.Duration(r.config.FrameRate)
|
delay := time.Second / time.Duration(r.config.FrameRate)
|
||||||
f, err := os.Open(r.config.InputFileName)
|
f, err := os.Open(r.config.InputFileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.config.Logger.Log(logger.Error, err.Error())
|
|
||||||
r.Stop()
|
r.Stop()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue