From c9dee735d43b6295d8ab711595d5efacd1dd872e Mon Sep 17 00:00:00 2001 From: Ella Pietraroia Date: Wed, 22 Jan 2020 15:44:53 +1030 Subject: [PATCH] back to old return --- filter/mog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/mog.go b/filter/mog.go index b86e1cdf..ca318140 100644 --- a/filter/mog.go +++ b/filter/mog.go @@ -87,7 +87,7 @@ func (m *MOGFilter) Write(f []byte) (int, error) { m.hfCount = 0 img, err := gocv.IMDecode(f, gocv.IMReadColor) if err != nil { - return len(f), fmt.Errorf("image can't be decoded: %w", err) + return 0, fmt.Errorf("image can't be decoded: %w", err) } defer img.Close()