summaryrefslogtreecommitdiffstats
path: root/src/multimedia/camera/qcameraimagecapture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/camera/qcameraimagecapture.cpp')
-rw-r--r--src/multimedia/camera/qcameraimagecapture.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/multimedia/camera/qcameraimagecapture.cpp b/src/multimedia/camera/qcameraimagecapture.cpp
index c78ef2097..0682729c8 100644
--- a/src/multimedia/camera/qcameraimagecapture.cpp
+++ b/src/multimedia/camera/qcameraimagecapture.cpp
@@ -126,7 +126,7 @@ void QCameraImageCapture::setCaptureSession(QMediaCaptureSession *session)
return;
}
- d->control = session->platformSession()->imageCaptureControl();
+ d->control = session->platformSession()->addImageCapture();
if (!d->control)
return;
@@ -153,8 +153,10 @@ void QCameraImageCapture::setCaptureSession(QMediaCaptureSession *session)
QCameraImageCapture::~QCameraImageCapture()
{
- if (d_ptr->captureSession)
+ if (d_ptr->captureSession) {
+ d_ptr->captureSession->platformSession()->releaseImageCapture(d_ptr->control);
d_ptr->captureSession->setImageCapture(nullptr);
+ }
delete d_ptr;
}