aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDafna Hirschfeld <dafna3@gmail.com>2019-02-24 08:41:21 (GMT)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-25 10:41:19 (GMT)
commit18e59d6cca66ca3c15122e07c8aef0afe880b269 (patch)
tree57a7e5af92f70ac610b412b8374ae28cf7f1b548
parent899c018f08e8489ef736e0b3275dfa94d2bc14d8 (diff)
v4l2-ctl: test if do_setup_out_buffers returns -1 instead of non zero
If 'do_setup_out_buffers' returns -2 it means that it finished queuing all output stream buffers and the program should not terminate in that case. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 6f4317b..d023aa1 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -1823,7 +1823,7 @@ static void streaming_set_out(cv4l_fd &fd, cv4l_fd &exp_fd)
if (q.obtain_bufs(&fd))
goto done;
- if (do_setup_out_buffers(fd, q, fin, true))
+ if (do_setup_out_buffers(fd, q, fin, true) == -1)
goto done;
fps_ts.determine_field(fd.g_fd(), type);
@@ -2013,7 +2013,7 @@ static void streaming_set_m2m(cv4l_fd &fd, cv4l_fd &exp_fd)
goto done;
}
- if (do_setup_out_buffers(fd, out, file[OUT], true))
+ if (do_setup_out_buffers(fd, out, file[OUT], true) == -1)
goto done;
if (fd.streamon(out.g_type()))
@@ -2250,7 +2250,7 @@ static void streaming_set_cap2out(cv4l_fd &fd, cv4l_fd &out_fd)
if (in.obtain_bufs(&fd) ||
in.queue_all(&fd) ||
- do_setup_out_buffers(out_fd, out, file[OUT], false))
+ do_setup_out_buffers(out_fd, out, file[OUT], false) == -1)
goto done;
fps_ts[CAP].determine_field(fd.g_fd(), in.g_type());

Privacy Policy