aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-07-27 13:44:16 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2014-07-27 13:44:16 +0200
commit8708d94c1f74a81caf2a7d8d4a6d737581737dcd (patch)
tree20840523809bb7379ae46091ffa7777e272a2d11
parent51d91604bbcc131179e0b388ebf8f5609ca2e5ca (diff)
v4l2-ctl: --clear-bitmap or --clear-clips didn't actually clear it
If --clear-bitmap or --clear-clips were combined with --set-fmt-overlay without any other changes, then those options were ignored and VIDIOC_S_FMT was never called. Add a check whether those options were defined to ensure S_FMT is actually called. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-overlay.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp
index f4f2db16..3cbbd562 100644
--- a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp
@@ -514,7 +514,8 @@ free:
void overlay_set(int fd)
{
if ((options[OptSetOverlayFormat] || options[OptTryOverlayFormat]) &&
- (set_overlay_fmt || bitmap_rects.size() || clips.size())) {
+ (set_overlay_fmt || options[OptClearClips] || options[OptClearBitmap] ||
+ bitmap_rects.size() || clips.size())) {
struct v4l2_format fmt;
memset(&fmt, 0, sizeof(fmt));

Privacy Policy