This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: v4l2-compliance: zero some v4l2_window field for TRY_FMT.
Author:  Hans Verkuil <[email protected]>
Date:    Mon Sep 10 19:30:33 2012 +0200

For overlays the clip, clipcount and bitmap fields should be zeroed
to prevent EFAULT errors when the struct contents is set to 0xff.

Signed-off-by: Hans Verkuil <[email protected]>
(cherry picked from commit 54455f8ee671292e7ba0af787099566b988e91b0)

Signed-off-by: Gregor Jasny <[email protected]>

 utils/v4l2-compliance/v4l2-test-formats.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=418d4c6ebbe1e7fa6adc0ceaa524611ac2bc885d

diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp 
b/utils/v4l2-compliance/v4l2-test-formats.cpp
index 404a47b..e1e6292 100644
--- a/utils/v4l2-compliance/v4l2-test-formats.cpp
+++ b/utils/v4l2-compliance/v4l2-test-formats.cpp
@@ -562,6 +562,12 @@ int testTryFormats(struct node *node)
                memset(&fmt, 0xff, sizeof(fmt));
                fmt.type = type;
                fmt.fmt.pix.field = V4L2_FIELD_ANY;
+               if (type == V4L2_BUF_TYPE_VIDEO_OVERLAY ||
+                   type == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY) {
+                       fmt.fmt.win.clipcount = 0;
+                       fmt.fmt.win.clips = NULL;
+                       fmt.fmt.win.bitmap = NULL;
+               }
                ret = doioctl(node, VIDIOC_TRY_FMT, &fmt);
                ret = testFormatsType(node, ret, type, fmt);
                if (ret)

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to