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

Subject: v4l2-ctl: only toggle field for FIELD_ALTERNATE
Author:  Hans Verkuil <[email protected]>
Date:    Sat Mar 12 13:41:08 2016 +0100

Toggling between TOP and BOTTOM fields for output streaming should
only be done if V4L2_FIELD_ALTERNATE was specified.

Otherwise streaming only TOP fields would also cause this to toggle,
and that's not what you want.

Signed-off-by: Hans Verkuil <[email protected]>

 utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=63b6e7857506c5cf32e272589d695dc9222e619f
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp 
b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index f39eb068e490..cf89f3da1276 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -706,10 +706,12 @@ static int do_setup_out_buffers(int fd, buffers &b, FILE 
*fin, bool qbuf)
 
                buf.field = field;
                tpg_s_field(&tpg, field, output_field_alt);
-               if (field == V4L2_FIELD_TOP)
-                       field = V4L2_FIELD_BOTTOM;
-               else if (field == V4L2_FIELD_BOTTOM)
-                       field = V4L2_FIELD_TOP;
+               if (output_field_alt) {
+                       if (field == V4L2_FIELD_TOP)
+                               field = V4L2_FIELD_BOTTOM;
+                       else if (field == V4L2_FIELD_BOTTOM)
+                               field = V4L2_FIELD_TOP;
+               }
 
                if (b.is_mplane) {
                        for (unsigned j = 0; j < b.num_planes; j++) {
@@ -979,10 +981,12 @@ static int do_handle_out(int fd, buffers &b, FILE *fin, 
struct v4l2_buffer *cap,
        }
        buf.field = output_field;
        tpg_s_field(&tpg, output_field, output_field_alt);
-       if (output_field == V4L2_FIELD_TOP)
-               output_field = V4L2_FIELD_BOTTOM;
-       else if (output_field == V4L2_FIELD_BOTTOM)
-               output_field = V4L2_FIELD_TOP;
+       if (output_field_alt) {
+               if (output_field == V4L2_FIELD_TOP)
+                       output_field = V4L2_FIELD_BOTTOM;
+               else if (output_field == V4L2_FIELD_BOTTOM)
+                       output_field = V4L2_FIELD_TOP;
+       }
 
        if (fin && !fill_buffer_from_file(b, buf.index, fin))
                return -1;

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

Reply via email to