summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc
diff options
context:
space:
mode:
authorBaoyou Xie2017-09-07 04:59:48 +0200
committerMauro Carvalho Chehab2017-12-08 17:32:29 +0100
commitdfc1648c576719b5a2701805aab1e208789d5969 (patch)
treec9c49af6c8c6c5936f9e56a8d2cec7911b14c9de /drivers/media/usb/uvc
parentmedia: uvcvideo: Remove duplicate & operation (diff)
downloadkernel-qcow2-linux-dfc1648c576719b5a2701805aab1e208789d5969.tar.gz
kernel-qcow2-linux-dfc1648c576719b5a2701805aab1e208789d5969.tar.xz
kernel-qcow2-linux-dfc1648c576719b5a2701805aab1e208789d5969.zip
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: Baoyou Xie <baoyou.xie@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/uvc')
-rw-r--r--drivers/media/usb/uvc/uvc_video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index f4ace6352520..73cd44e8bd81 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1077,6 +1077,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;
}
}