diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2018-11-26 11:48:16 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2018-11-26 11:51:32 +0100 |
commit | 8a9e93cf22fc3b657bfa75939c0e7fbae7745b5d (patch) | |
tree | d49f0704873f54958d73e02305a6a34c742c512d | |
parent | b68732cb0cc3cecce42275eae5458780a9e5d19e (diff) |
v4l2-compliance: select the right mediaX for vivid
The vivid driver is unusual since it creates multiple media devices
for one driver instance. Use the bus_info to match the right media
device.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r-- | utils/v4l2-compliance/v4l2-compliance.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index 1fb51721..792525f4 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -714,9 +714,6 @@ void testNode(struct node &node, struct node &expbuf_node, media_type type, /* Information Opts */ - if (!node.is_media()) - media_fd = mi_get_media_fd(node.g_fd()); - if (node.is_v4l2()) { printf("Driver Info:\n"); v4l2_info_capability(vcap); @@ -740,6 +737,10 @@ void testNode(struct node &node, struct node &expbuf_node, media_type type, } } + if (!node.is_media()) + media_fd = mi_get_media_fd(node.g_fd(), + is_vivid ? (const char *)vcap.bus_info : NULL); + __u32 ent_id = 0; bool is_invalid = false; |