diff mbox series

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

Message ID 20190224084126.19412-4-dafna3@gmail.com (mailing list archive)
State New, archived
Headers show
Series add support to stateless decoder | expand

Commit Message

Dafna Hirschfeld Feb. 24, 2019, 8:41 a.m. UTC
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>
---
 utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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());