diff --git a/src/frontend/qt_sdl/CameraManager.cpp b/src/frontend/qt_sdl/CameraManager.cpp index fafaea56..689ec885 100644 --- a/src/frontend/qt_sdl/CameraManager.cpp +++ b/src/frontend/qt_sdl/CameraManager.cpp @@ -165,12 +165,10 @@ void CameraManager::init() #if QT_VERSION >= 0x060000 const QList cameras = QMediaDevices::videoInputs(); - const QCameraDevice& dev; for (const QCameraDevice& cam : cameras) { if (QString(cam.id()) == camDeviceName) { - dev = cam; camDevice = new QCamera(cam); break; } @@ -178,7 +176,7 @@ void CameraManager::init() if (camDevice) { - const QList supported = dev.videoFormats(); + const QList supported = camDevice.cameraDevice().videoFormats(); bool good = false; for (const QCameraFormat& item : supported) {