From 35a7e7d703723d0b05fcc8ea2ff109581bd181b2 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 3 Mar 2014 10:44:57 +0100 Subject: [PATCH] qv4l2: fix incorrect call to s_fmt when disabling width/height When the frame width and height fields are disabled because we start streaming, the editingFinished event is triggered as well, which causes an attempt to change the format. This causes EBUSY warnings because it really isn't allowed to do that anymore. Check if the field is really enabled before we change the format, thus squashing the warnings. Signed-off-by: Hans Verkuil --- utils/qv4l2/general-tab.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp index 7cdb217..69242c2 100644 --- a/utils/qv4l2/general-tab.cpp +++ b/utils/qv4l2/general-tab.cpp @@ -892,6 +892,8 @@ void GeneralTab::frameWidthChanged() v4l2_format fmt; int val = m_frameWidth->value(); + if (!m_frameWidth->isEnabled()) + return; g_fmt_cap(fmt); fmt.fmt.pix.width = val; if (try_fmt(fmt)) @@ -905,6 +907,8 @@ void GeneralTab::frameHeightChanged() v4l2_format fmt; int val = m_frameHeight->value(); + if (!m_frameHeight->isEnabled()) + return; g_fmt_cap(fmt); fmt.fmt.pix.height = val; if (try_fmt(fmt)) -- 2.7.4