mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
UPSTREAM: media: uvcvideo: Mark buffer error where overflow
Some cameras post inaccurate frame where next frame data overlap
it. this results in screen flicker, and it need to be prevented.
So this patch marks the buffer error to discard the frame where
buffer overflow.
Change-Id: Ibd41b93cf8376b126b6d107a59ab22907fb839e6
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit dfc1648c57)
This commit is contained in:
@@ -1088,6 +1088,7 @@ static void uvc_video_decode_data(struct uvc_streaming *stream,
|
||||
/* Complete the current frame if the buffer size was exceeded. */
|
||||
if (len > maxlen) {
|
||||
uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n");
|
||||
buf->error = 1;
|
||||
buf->state = UVC_BUF_STATE_READY;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user