summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@qt.io>2016-07-13 11:20:54 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-08-12 11:17:23 +0000
commitd78e0716dd97ea0c874928bcde0531fda297703a (patch)
treefa7d4c7ef0ff0d4146767afaca7ac434a1ef2782
parentb76958f23e971e25a38ed2b9525dcca1cb3d954d (diff)
Android: don't process capture previews when capture is canceled
Change-Id: Ia068b0fcc30412755639412ec03e49c740b66bed Reviewed-by: Christian Stromme <christian.stromme@qt.io>
-rw-r--r--src/plugins/android/src/mediacapture/qandroidcamerasession.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp b/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp
index df9f0367..1689a55b 100644
--- a/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp
+++ b/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp
@@ -576,6 +576,9 @@ void QAndroidCameraSession::onCameraPictureExposed()
void QAndroidCameraSession::onLastPreviewFrameFetched(const QVideoFrame &frame)
{
+ if (m_captureCanceled)
+ return;
+
QtConcurrent::run(this, &QAndroidCameraSession::processPreviewImage,
m_currentImageCaptureId,
frame,