Audiobook fix

This commit is contained in:
Jakub Melka 2021-07-06 15:19:47 +02:00
parent 5acd3e8cd8
commit 702a9df7cb
1 changed files with 3 additions and 2 deletions

View File

@ -289,7 +289,7 @@ QString PDFToolAudioBookVoices::getStandardString(PDFToolAbstractApplication::St
int PDFToolAudioBookVoices::execute(const PDFToolOptions& options) int PDFToolAudioBookVoices::execute(const PDFToolOptions& options)
{ {
if (!SUCCEEDED(::CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_SPEED_OVER_MEMORY))) if (!SUCCEEDED(::CoInitialize(nullptr)))
{ {
return ErrorCOM; return ErrorCOM;
} }
@ -457,7 +457,8 @@ int PDFToolAudioBook::execute(const PDFToolOptions& options)
return ErrorNoText; return ErrorNoText;
} }
if (!SUCCEEDED(::CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_SPEED_OVER_MEMORY))) auto comResult = ::CoInitialize(nullptr);
if (!SUCCEEDED(comResult))
{ {
return ErrorCOM; return ErrorCOM;
} }