From: Kirill A. Korinsky Subject: Re: sys/uvideo: don't skip frame immediately when buffer unavailable (regression from v1.256) To: Marcus Glocker Cc: tech@openbsd.org Date: Sat, 19 Apr 2025 10:02:46 +0200 On Sat, 19 Apr 2025 08:39:46 +0200, Marcus Glocker wrote: > > On Fri, Apr 18, 2025 at 10:11:36PM GMT, Kirill A. Korinsky wrote: > > > before this diff, an application gets malformed frame. With this version it > > gets the next, well formed frame. > > One other question, just that I have asked it; Did we consider to set > the V4L2_BUF_FLAG_ERROR bit in such a case, and still pass the corrupted > frame to the application? I'm guessing applications like luvcview and > motion don't credit this flag though ... > A fast and naive search against their code by the flag name retruns nothing: https://github.com/search?q=repo%3AMotion-Project%2Fmotion+V4L2_BUF_FLAG_ERROR&type=code Anyway, I think that just mark such frame as error is wrong way. This is a kind of synchronization error, and my changes keeps the buffer on the driver side for the next frame. When it queued it for an application, the last one may release it not immedently, and scenario with issue may appears again. -- wbr, Kirill