[v4l-utils PATCH v3 3/8] v4l2-ctl: test if do_setup_out_buffers returns -1 instead of non zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 6f4317bf..d023aa12 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());
-- 
2.17.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux