aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-ctl
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-30 14:16:25 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-30 14:20:34 +0100
commit84219e2b5d013709ee5259621715966c46eec746 (patch)
treec14722059f1595b07d33d0d3d9aa975d0f539dbd /utils/v4l2-ctl
parent5d00c74f80ea134e514ca765c18c48fa99758c7b (diff)
v4l2-ctl: get fmt after source change
When a source change event arrives during decoding get the new format at that point instead of after restarting streaming. If there is another source change queued up, then when you call streamon for CAPTURE again it might send the new source change event and update the format for that one, so reading the format after streamon might give the wrong format. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/v4l2-ctl')
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index bb656584..3695a027 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -2363,12 +2363,11 @@ static void stateful_m2m(cv4l_fd &fd, cv4l_queue &in, cv4l_queue &out,
if (in_source_change_event) {
in_source_change_event = false;
last_buffer = false;
+ fd.g_fmt(fmt_in, in.g_type());
if (capture_setup(fd, in, exp_fd_p))
return;
fps_ts[CAP].reset();
fps_ts[OUT].reset();
- fd.g_fmt(fmt_out, out.g_type());
- fd.g_fmt(fmt_in, in.g_type());
cap_streaming = true;
} else {
break;

Privacy Policy