| Index: media/audio/win/device_enumeration_win.cc
|
| diff --git a/media/audio/win/device_enumeration_win.cc b/media/audio/win/device_enumeration_win.cc
|
| index 894b61cc7df97e4c5e957804e53f71f326687893..9be9d49270d4f7c27b0c632a89adb2afc288d517 100644
|
| --- a/media/audio/win/device_enumeration_win.cc
|
| +++ b/media/audio/win/device_enumeration_win.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include <MMDeviceAPI.h>
|
| #include <mmsystem.h>
|
| +#include <objbase.h>
|
| #include <Functiondiscoverykeys_devpkey.h> // MMDeviceAPI.h must come first
|
| #include <stddef.h>
|
|
|
| @@ -29,8 +30,9 @@ static bool GetDeviceNamesWinImpl(EDataFlow data_flow,
|
| // It is assumed that this method is called from a COM thread, i.e.,
|
| // CoInitializeEx() is not called here again to avoid STA/MTA conflicts.
|
| ScopedComPtr<IMMDeviceEnumerator> enumerator;
|
| - HRESULT hr = enumerator.CreateInstance(__uuidof(MMDeviceEnumerator), NULL,
|
| - CLSCTX_INPROC_SERVER);
|
| + HRESULT hr =
|
| + ::CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL,
|
| + CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&enumerator));
|
| DCHECK_NE(CO_E_NOTINITIALIZED, hr);
|
| if (FAILED(hr)) {
|
| LOG(WARNING) << "Failed to create IMMDeviceEnumerator: " << std::hex << hr;
|
|
|