summaryrefslogtreecommitdiffstats
path: root/loader/dshow/DS_Filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'loader/dshow/DS_Filter.c')
-rw-r--r--loader/dshow/DS_Filter.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/loader/dshow/DS_Filter.c b/loader/dshow/DS_Filter.c
index 8482201317..ccc45bcb89 100644
--- a/loader/dshow/DS_Filter.c
+++ b/loader/dshow/DS_Filter.c
@@ -1,3 +1,4 @@
+#include "config.h"
#include "DS_Filter.h"
#include "driver.h"
#include "com.h"
@@ -8,6 +9,22 @@
typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**);
+#ifndef WIN32_LOADER
+const GUID IID_IUnknown =
+{
+ 0x00000000, 0x0000, 0x0000,
+ {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}
+};
+const GUID IID_IClassFactory =
+{
+ 0x00000001, 0x0000, 0x0000,
+ {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}
+};
+
+HRESULT STDCALL CoInitialize(LPVOID pvReserved);
+void STDCALL CoUninitialize(void);
+#endif
+
//void trapbug();
static void DS_Filter_Start(DS_Filter* This)
@@ -77,7 +94,11 @@ void DS_Filter_Destroy(DS_Filter* This)
free(This);
+#ifdef WIN32_LOADER
CodecRelease();
+#else
+ CoUninitialize();
+#endif
}
DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id,
@@ -92,7 +113,11 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id,
if (!This)
return NULL;
+#ifdef WIN32_LOADER
CodecAlloc();
+#else
+ CoInitialize(0L);
+#endif
This->m_pFilter = NULL;
This->m_pInputPin = NULL;