mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Don't init COM for FFMS2
FFMS2 no longer uses COM for anything.
This commit is contained in:
parent
8823476275
commit
b8fa7e010b
@ -50,29 +50,9 @@
|
||||
#include <wx/intl.h>
|
||||
#include <wx/choicdlg.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <objbase.h>
|
||||
|
||||
static void deinit_com(bool) {
|
||||
CoUninitialize();
|
||||
}
|
||||
#else
|
||||
static void deinit_com(bool) { }
|
||||
#endif
|
||||
|
||||
FFmpegSourceProvider::FFmpegSourceProvider(agi::BackgroundRunner *br)
|
||||
: COMInited(false, deinit_com)
|
||||
, br(br)
|
||||
: br(br)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
HRESULT res = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
|
||||
if (SUCCEEDED(res))
|
||||
COMInited = true;
|
||||
else if (res != RPC_E_CHANGED_MODE)
|
||||
throw agi::EnvironmentError("COM initialization failure");
|
||||
#endif
|
||||
|
||||
// initialize ffmpegsource
|
||||
FFMS_Init(0, 1);
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,6 @@ namespace agi { class BackgroundRunner; }
|
||||
/// @brief Base class for FFMS2 source providers; contains common functions etc
|
||||
class FFmpegSourceProvider {
|
||||
friend class FFmpegSourceCacheCleaner;
|
||||
agi::scoped_holder<bool> COMInited; ///< COM initialization state
|
||||
agi::BackgroundRunner *br;
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user