|
@@ -1,6 +1,7 @@
|
|
|
#include "../platform.hpp"
|
|
|
|
|
|
#include <util/platform.h>
|
|
|
+#include <comdef.h>
|
|
|
|
|
|
IDeckLinkDiscovery *CreateDeckLinkDiscoveryInstance(void)
|
|
|
{
|
|
@@ -31,11 +32,10 @@ bool DeckLinkStringToStdString(decklink_string_t input, std::string &output)
|
|
|
if (input == nullptr)
|
|
|
return false;
|
|
|
|
|
|
- size_t len = wcslen(input);
|
|
|
- size_t utf8_len = os_wcs_to_utf8(input, len, nullptr, 0);
|
|
|
+ char *out = _com_util::ConvertBSTRToString(input);
|
|
|
+ output = std::string(out);
|
|
|
|
|
|
- output.resize(utf8_len);
|
|
|
- os_wcs_to_utf8(input, len, &output[0], utf8_len);
|
|
|
+ delete[] out;
|
|
|
|
|
|
return true;
|
|
|
}
|