diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-03-29 11:07:15 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-03-29 16:05:31 +0100 |
commit | 5fd80865a2ec127ba7342c45f2e4962133b83e97 (patch) | |
tree | fb8ae9fc728b3a29b1f33fd7a030d348b1020c9c | |
parent | 10acbc566ecc458f21fb171fc8e4212701051709 (diff) |
v4l2-compliance: for m2m devices fix frame counting
For m2m devices the pre-queued output buffers need to be taken
into account when calculating the number of frames that have
been streamed.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r-- | utils/v4l2-compliance/v4l2-test-buffers.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp index 8c2ea8cc..5f906860 100644 --- a/utils/v4l2-compliance/v4l2-test-buffers.cpp +++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp @@ -818,6 +818,13 @@ static int captureBufs(struct node *node, const cv4l_queue &q, int epollfd = -1; int ret; + if (node->is_m2m) { + if (count <= q.g_buffers()) + count = 1; + else + count -= q.g_buffers(); + } + capture_count = 0; if (show_info) { |