Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1727886 > unrolled thread
| Started by | Baoyou Xie <baoyou.xie@linaro.org> |
|---|---|
| First post | 2017-09-07 05:10 +0200 |
| Last post | 2017-09-07 05:10 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v1] [media] uvcvideo: mark buffer error where overflow Baoyou Xie <baoyou.xie@linaro.org> - 2017-09-07 05:10 +0200
| From | Baoyou Xie <baoyou.xie@linaro.org> |
|---|---|
| Date | 2017-09-07 05:10 +0200 |
| Subject | [PATCH v1] [media] uvcvideo: mark buffer error where overflow |
| Message-ID | <umVmx-2sp-9@gated-at.bofh.it> |
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>
---
drivers/media/usb/uvc/uvc_video.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index fb86d6a..81a3530 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;
}
}
--
2.7.4
Back to top | Article view | linux.kernel
csiph-web