fix(darwin,msmf): Block Read until next frame (reset haveFrame)

This commit is contained in:
Milan Nikolic
2026-07-04 09:23:08 +02:00
parent 88b442ee5f
commit 7a3e92c005
2 changed files with 2 additions and 0 deletions

View File

@@ -170,6 +170,7 @@ func (c *Camera) Read() (img image.Image, err error) {
}
bgraToRgba(c.frame, c.rgba)
c.haveFrame = false
c.mu.Unlock()

View File

@@ -373,6 +373,7 @@ func (c *Camera) Read() (img image.Image, err error) {
nv12ToYCbCr420(c.frame, c.stride, c.width, c.height, c.ycbcr)
img = c.ycbcr
c.haveFrame = false
c.mu.Unlock()