提交 dfc1648c 编写于 作者: B Baoyou Xie 提交者: Mauro Carvalho Chehab

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.
Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org>
Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 5ba3dff4
...@@ -1077,6 +1077,7 @@ static void uvc_video_decode_data(struct uvc_streaming *stream, ...@@ -1077,6 +1077,7 @@ static void uvc_video_decode_data(struct uvc_streaming *stream,
/* Complete the current frame if the buffer size was exceeded. */ /* Complete the current frame if the buffer size was exceeded. */
if (len > maxlen) { if (len > maxlen) {
uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n"); uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n");
buf->error = 1;
buf->state = UVC_BUF_STATE_READY; buf->state = UVC_BUF_STATE_READY;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册