The patch number 8163 was added via Hans Verkuil <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Hans Verkuil  <[EMAIL PROTECTED]>
v4l2-ctl: fix bug in --set-standard


--set-standard allows you to set a standard index corresponding to
what ENUMSTD returns. But this clashes when you specify a standard whose
ID is very small, like PAL-BG. Then the utility thinks you specified
a standard index and will select the wrong standard.

Fixed by using a flag to mark that the standard actually is a standard
and not a standard index.

Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>


---

 v4l2-apps/util/v4l2-ctl.cpp |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -r 83a8f7dfc45d -r 54a4582e55d1 v4l2-apps/util/v4l2-ctl.cpp
--- a/v4l2-apps/util/v4l2-ctl.cpp       Fri Jun 27 17:33:02 2008 +0200
+++ b/v4l2-apps/util/v4l2-ctl.cpp       Fri Jun 27 18:16:22 2008 +0200
@@ -1365,7 +1365,7 @@ int main(int argc, char **argv)
                                        std = V4L2_STD_SECAM;
                        }
                        else {
-                               std = strtol(optarg, 0L, 0);
+                               std = strtol(optarg, 0L, 0) | (1ULL << 63);
                        }
                        break;
                case OptGetCtrl:
@@ -1562,8 +1562,8 @@ int main(int argc, char **argv)
        }
 
        if (options[OptSetStandard]) {
-               if (std < 16) {
-                       vs.index = std;
+               if (std & (1ULL << 63)) {
+                       vs.index = std & 0xffff;
                        if (ioctl(fd, VIDIOC_ENUMSTD, &vs) >= 0) {
                                std = vs.id;
                        }


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/54a4582e55d1e7d7789bba270ca9b41c51e5b139

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to