Hi Michael, Looks like we found the same issue, I submitted the same change the other week here: https://lore.kernel.org/all/20220331184024.23918-1-w36195@xxxxxxxxxxxx/ One difference is you had the reset outside of the queue lock. I figured to keep it within the lock since we can get a cancel while the pump worker is running and this can negate the reset. Do you agree? Thanks, Dan On Tue, Apr 05, 2022 at 11:43:16AM +0300, Sergey Shtylyov wrote: > Hello! > > On 4/3/22 2:39 AM, Michael Grzeschik wrote: > > > On uvcg_queue_cancel the buf_used counter has to be reset. Since the > > encode function uses the variable to decide if the encoded data has > > reached the end of frame. Intermediate calls of uvcg_queue_cancel can > > therefor lead to miscalculations in the encode functions, if buf_used > > Therefore? > > > was not properly reset. > > > > Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx> > [...] > > MBR, Sergey