[PATCH] v4l2-ctl: Operate on output device if specified

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

 



The video output get, set and list options operate on the device set by
--device, even if the --out-device option is specified to select a
different output device. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
---
 utils/v4l2-ctl/v4l2-ctl.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index 764a7c716159..1c433355c17b 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -1471,7 +1471,7 @@ int main(int argc, char **argv)
 	io_set(c_fd);
 	stds_set(c_fd);
 	vidcap_set(c_fd);
-	vidout_set(c_fd);
+	vidout_set(out_device ? c_out_fd : c_fd);
 	overlay_set(c_fd);
 	vbi_set(c_fd);
 	sdr_set(c_fd);
@@ -1488,7 +1488,7 @@ int main(int argc, char **argv)
 	io_get(c_fd);
 	stds_get(c_fd);
 	vidcap_get(c_fd);
-	vidout_get(c_fd);
+	vidout_get(out_device ? c_out_fd : c_fd);
 	overlay_get(c_fd);
 	vbi_get(c_fd);
 	sdr_get(c_fd);
@@ -1504,7 +1504,7 @@ int main(int argc, char **argv)
 	io_list(c_fd);
 	stds_list(c_fd);
 	vidcap_list(c_fd);
-	vidout_list(c_fd);
+	vidout_list(out_device ? c_out_fd : c_fd);
 	overlay_list(c_fd);
 	vbi_list(c_fd);
 	sdr_list(c_fd);
-- 
Regards,

Laurent Pinchart




[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