diff --git a/src/detection/camera/camera_windows.cpp b/src/detection/camera/camera_windows.cpp index fb7a653ea..48ee9dc45 100644 --- a/src/detection/camera/camera_windows.cpp +++ b/src/detection/camera/camera_windows.cpp @@ -72,13 +72,13 @@ extern "C" const char* ffDetectCamera(FF_A_UNUSED FFlist* result) { continue; } - IMFStreamDescriptor* FF_AUTO_RELEASE_COM_OBJECT sd = NULL; + IMFStreamDescriptor* FF_AUTO_RELEASE_COM_OBJECT sd = nullptr; BOOL selected; if (FAILED(pd->GetStreamDescriptorByIndex(0, &selected, &sd))) { continue; } - IMFMediaTypeHandler* FF_AUTO_RELEASE_COM_OBJECT handler = NULL; + IMFMediaTypeHandler* FF_AUTO_RELEASE_COM_OBJECT handler = nullptr; if (FAILED(sd->GetMediaTypeHandler(&handler))) { continue; } diff --git a/src/detection/sound/sound_windows.cpp b/src/detection/sound/sound_windows.cpp index c770f5c97..835eb63a2 100644 --- a/src/detection/sound/sound_windows.cpp +++ b/src/detection/sound/sound_windows.cpp @@ -25,7 +25,7 @@ static const char* detectSoundDevice(FFlist* devices /* List of FFSoundDevice */ return "immDevice->GetId() failed"; } - IPropertyStore* FF_AUTO_RELEASE_COM_OBJECT immPropStore; + IPropertyStore* FF_AUTO_RELEASE_COM_OBJECT immPropStore = NULL; if (FAILED(immDevice->OpenPropertyStore(STGM_READ, &immPropStore))) { return "immDevice->OpenPropertyStore() failed"; } @@ -54,7 +54,7 @@ static const char* detectSoundDevice(FFlist* devices /* List of FFSoundDevice */ } } - IAudioEndpointVolume* FF_AUTO_RELEASE_COM_OBJECT immEndpointVolume; + IAudioEndpointVolume* FF_AUTO_RELEASE_COM_OBJECT immEndpointVolume = NULL; if (SUCCEEDED(immDevice->Activate(IID_IAudioEndpointVolume, CLSCTX_ALL, NULL, (void**) &immEndpointVolume))) { BOOL muted; if (FAILED(immEndpointVolume->GetMute(&muted)) || !muted) {