Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: sys/uvideo: treat frame as done when mmap queue is overflowed
To:
Marcus Glocker <marcus@nazgul.ch>
Cc:
tech@openbsd.org
Date:
Tue, 25 Feb 2025 23:19:58 +0100

Download raw body.

Thread
On Tue, 25 Feb 2025 22:07:30 +0100,
Marcus Glocker <marcus@nazgul.ch> wrote:
> 
> I've noticed that the for loop in uvideo_vs_cb() is checking
> sc->sc_decode_stream_header() for an USBD_CANCELLED return code, but
> sc->sc_decode_stream_header() is never returning that.  Probably we
> should better check for 'error != USBD_NORMAL_COMPLETION' to break
> the for loop, and then always reset the frame buffers sample, fid, and
> error flags to zero in sc->sc_decode_stream_header() return error case.
>
> I can come up with a diff for that later.
>

Not sure that it is a good idea.

A for loop exists only for isochronous endpoint, and if one of parallel
readed frame is contained something very wired, other one may contain
usefull data.

-- 
wbr, Kirill