aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-29 17:59:55 (GMT)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-29 17:59:55 (GMT)
commit3d9b37ebf1d169c092052b66cd1fdcc0091b8fb2 (patch)
tree2dbe5a6a0efb9e16ee456cdff323fdf9ef01ed98
parent0852e053d764ac780263bb834b4138eabe368dbb (diff)
v4l2-ctl: fix support for non-codec m2m devices
The new code to support codec devices inadvertently broke the support for non-codec m2m devices such as vim2m. Restore support for this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 8d034b8..c202f4f 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -1922,9 +1922,6 @@ static void streaming_set_m2m(cv4l_fd &fd)
bool is_encoder = false;
enum codec_type codec_type = get_codec_type(fd);
- if (codec_type == NOT_CODEC)
- goto done;
-
if (have_eos) {
cv4l_fmt fmt(in.g_type());
@@ -1934,7 +1931,7 @@ static void streaming_set_m2m(cv4l_fd &fd)
memset(&sub, 0, sizeof(sub));
sub.type = V4L2_EVENT_SOURCE_CHANGE;
- if (fd.subscribe_event(sub))
+ if (fd.subscribe_event(sub) && codec_type != NOT_CODEC)
goto done;
if (file_to) {
@@ -1968,7 +1965,7 @@ static void streaming_set_m2m(cv4l_fd &fd)
if (fd.streamon(out.g_type()))
goto done;
- if (codec_type == ENCODER)
+ if (codec_type != DECODER)
if (capture_setup(fd, in))
goto done;

Privacy Policy