v4l2-compliance: fix buffer state test
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 10 Sep 2014 07:14:03 +0000 (09:14 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Wed, 10 Sep 2014 07:14:03 +0000 (09:14 +0200)
This test checks that a buffer can only be in a single state,
i.e. it can't be both QUEUED and DONE. But it also counted ERROR
as a separate state, but that's incorrect. ERROR is a separate
flag, independent of state.

Fix this test accordingly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/v4l2-compliance/v4l2-test-buffers.cpp

index 32923da..bab64c8 100644 (file)
@@ -253,8 +253,6 @@ int buffer::check(unsigned type, unsigned memory, unsigned index,
                buf_states++;
        if (g_flags() & V4L2_BUF_FLAG_DONE)
                buf_states++;
-       if (g_flags() & V4L2_BUF_FLAG_ERROR)
-               buf_states++;
        if (g_flags() & V4L2_BUF_FLAG_PREPARED)
                buf_states++;
        fail_on_test(buf_states > 1);