[sane-devel] [PATCH] v4l: loop through the read buffers so we don't get stale frames
marc.deslauriers at canonical.com
Mon Oct 18 13:02:35 UTC 2010
Attached is a patch for sane-backends that fixes the v4l driver so it
doesn't return return stale frames. It is against the latest stable
release, but should apply cleanly to git also.
When trying to capture frames from a Stratford Labs GFP-002 USB scanner,
which uses the v4l UVC driver, I was getting old cached frames from the
driver's read buffer instead of fresh ones. I have the same problem with
a couple of webcams I have tested also.
This patch reads multiple frames at a time to empty the driver's read
buffer. I couldn't find a way to instruct v4l to empty the buffers
without doing it this way.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2080 bytes
Desc: not available
More information about the sane-devel