mirror of https://bitbucket.org/ausocean/av.git
Frame counter resets on a consistent interval.
This commit is contained in:
parent
0b95041d4f
commit
4b28558924
|
@ -84,7 +84,9 @@ func (m *MOGFilter) Write(f []byte) (int, error) {
|
|||
m.hold[hfCount] = f
|
||||
hfCount++
|
||||
return 0, nil
|
||||
} else {
|
||||
}
|
||||
|
||||
hfCount = 0
|
||||
img, err := gocv.IMDecode(f, gocv.IMReadColor)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("image can't be decoded: %w", err)
|
||||
|
@ -147,7 +149,6 @@ func (m *MOGFilter) Write(f []byte) (int, error) {
|
|||
}
|
||||
}
|
||||
|
||||
hfCount = 0
|
||||
return m.dst.Write(f)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue