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