summaryrefslogtreecommitdiffstats
path: root/loader/dshow/allocator.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-21 21:06:08 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-21 21:06:08 +0000
commit597c4bf9259a707196273bd6cfe06bb408fb6843 (patch)
treed0c3bc73a8c113bbdc6d14c2d8f71519f4b95739 /loader/dshow/allocator.c
parent6d21e908a0cc9fccdcfa0063af05cd1627dcc9bb (diff)
downloadmpv-597c4bf9259a707196273bd6cfe06bb408fb6843.tar.bz2
mpv-597c4bf9259a707196273bd6cfe06bb408fb6843.tar.xz
cygwin support patch by Sascha Sommer and some fixes by me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9968 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/allocator.c')
-rw-r--r--loader/dshow/allocator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/loader/dshow/allocator.c b/loader/dshow/allocator.c
index 34d453727e..379b859d4c 100644
--- a/loader/dshow/allocator.c
+++ b/loader/dshow/allocator.c
@@ -1,3 +1,4 @@
+#include "config.h"
#include "allocator.h"
#include "com.h"
#include "wine/winerror.h"
@@ -286,8 +287,10 @@ static void MemAllocator_ResetPointer(MemAllocator* This)
static void MemAllocator_Destroy(MemAllocator* This)
{
Debug printf("MemAllocator_Destroy(%p) called (%d, %d)\n", This, This->refcount, AllocatorKeeper);
+#ifdef WIN32_LOADER
if (--AllocatorKeeper == 0)
UnregisterComClass(&CLSID_MemoryAllocator, MemAllocator_CreateAllocator);
+#endif
free(This->vt);
free(This);
}
@@ -338,8 +341,10 @@ MemAllocator* MemAllocatorCreate()
This->interfaces[0]=IID_IUnknown;
This->interfaces[1]=IID_IMemAllocator;
+#ifdef WIN32_LOADER
if (AllocatorKeeper++ == 0)
RegisterComClass(&CLSID_MemoryAllocator, MemAllocator_CreateAllocator);
+#endif
return This;
}