summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorIhor Dutchak <ihor.youw@gmail.com>2019-03-17 00:46:30 +0200
committerIhor Dutchak <ihor.youw@gmail.com>2019-04-01 13:08:45 +0000
commit5f15380e7c807c8111c32fc9bcf53189a868d23c (patch)
treeef8460f5d7bbc6c81360f492942d2d96670207cd /src/plugins
parentf41819387531a5ddfbad2e80ceec7b57a5ebb7c6 (diff)
downloadqtmultimedia-5f15380e7c807c8111c32fc9bcf53189a868d23c.tar.gz
DirectShow: don't change camera zoom level if not requested
DirectShowCameraZoomControl sets camera zoom level to 1x each time, when camera goes into LoadedStatus (e.g. on stream stop), which is inconveniant, specially if camera has physical remote, and zoom level may be changed externally. Disable this behavior, if zoom level was not requested explicitly by zoomTo(...) function from client code. Fixes: QTBUG-74180 Change-Id: I99ff76af04f80c630a0c397db5713e6706ebf175 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Ihor Dutchak <ihor.youw@gmail.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/directshow/camera/directshowcamerazoomcontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/directshow/camera/directshowcamerazoomcontrol.cpp b/src/plugins/directshow/camera/directshowcamerazoomcontrol.cpp
index 209cb5d96..079976e15 100644
--- a/src/plugins/directshow/camera/directshowcamerazoomcontrol.cpp
+++ b/src/plugins/directshow/camera/directshowcamerazoomcontrol.cpp
@@ -176,7 +176,7 @@ void DirectShowCameraZoomControl::updateZoomValues()
}
// Check if there is a pending zoom value.
- if (!qFuzzyCompare(m_currentOpticalZoom, m_requestedOpticalZoom))
+ if (!qFuzzyCompare(m_currentOpticalZoom, m_requestedOpticalZoom) && !qFuzzyIsNull(m_requestedOpticalZoom))
opticalZoomToPrivate(m_requestedOpticalZoom);
}