From: Hans Verkuil Date: Mon, 3 Mar 2014 09:44:57 +0000 (+0100) Subject: qv4l2: fix incorrect call to s_fmt when disabling width/height X-Git-Tag: v4l-utils-1.2.0~161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35a7e7d703723d0b05fcc8ea2ff109581bd181b2;p=platform%2Fupstream%2Fv4l-utils.git 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 --- 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))