diff --git a/modules/juce_video/native/juce_win32_CameraDevice.h b/modules/juce_video/native/juce_win32_CameraDevice.h index dc631b4821..e6dae57b48 100644 --- a/modules/juce_video/native/juce_win32_CameraDevice.h +++ b/modules/juce_video/native/juce_win32_CameraDevice.h @@ -52,14 +52,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster Pimpl (CameraDevice& ownerToUse, const String&, int index, int minWidth, int minHeight, int maxWidth, int maxHeight, bool /*highQuality*/) - : owner (ownerToUse), - isRecording (false), - openedSuccessfully (false), - imageNeedsFlipping (false), - width (0), height (0), - activeUsers (0), - recordNextFrameTime (false), - previewMaxFPS (60) + : owner (ownerToUse) { HRESULT hr = captureGraphBuilder.CoCreateInstance (CLSID_CaptureGraphBuilder2); if (FAILED (hr)) @@ -568,8 +561,8 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster CriticalSection pictureTakenCallbackLock; std::function pictureTakenCallback; - bool isRecording, openedSuccessfully; - int width, height; + bool isRecording = false, openedSuccessfully = false; + int width = 0, height = 0; Time firstRecordedTime; Array viewerComps; @@ -580,16 +573,16 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster ComSmartPtr sampleGrabber; ComSmartPtr mediaControl; ComSmartPtr smartTeePreviewOutputPin, smartTeeCaptureOutputPin; - int activeUsers; + int activeUsers = 0; Array widths, heights; DWORD graphRegistrationID; CriticalSection imageSwapLock; - bool imageNeedsFlipping; + bool imageNeedsFlipping = false; Image loadingImage, activeImage; - bool recordNextFrameTime; - int previewMaxFPS; + bool recordNextFrameTime = false; + int previewMaxFPS = 60; JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)