The UVC driver used to drop all the invalid frames (Eg, invalid JPEG encoding).
Since 2024 [1] , it pushes the invalid frames to userspace.
This patch handles the invalid frames properly.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=52fbe173baa4df9d14bd733f42ee6b9ceab8299b
gview_v4l2core/v4l2_core.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/gview_v4l2core/v4l2_core.c b/gview_v4l2core/v4l2_core.c index d32dbfb..71fbc62 100644 --- a/gview_v4l2core/v4l2_core.c +++ b/gview_v4l2core/v4l2_core.c @@ -1183,6 +1183,13 @@ v4l2_frame_buff_t v4l2core_get_frame(v4l2_dev_t vd) {
ret = xioctl(vd->fd, VIDIOC_DQBUF, &vd->buf);
Log in to post a comment.
The UVC driver used to drop all the invalid frames (Eg, invalid JPEG
encoding).
Since 2024 [1] , it pushes the invalid frames to userspace.
This patch handles the invalid frames properly.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=52fbe173baa4df9d14bd733f42ee6b9ceab8299b
Signed-off-by: Ricardo Ribalda ribalda@chromium.org
gview_v4l2core/v4l2_core.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gview_v4l2core/v4l2_core.c b/gview_v4l2core/v4l2_core.c
index d32dbfb..71fbc62 100644
--- a/gview_v4l2core/v4l2_core.c
+++ b/gview_v4l2core/v4l2_core.c
@@ -1183,6 +1183,13 @@ v4l2_frame_buff_t v4l2core_get_frame(v4l2_dev_t vd) {
+
if (!ret)
qind = process_input_buffer(vd);
else
--
2.55.0.rc0.799.gd6f94ed593-goog