summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 00:00:06 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 00:00:06 +0200
commitc37f09693d0edb632c80f8f38ecdb2faf3547f7f (patch)
tree44df07eacb522a97bbecd7a3a0f93e8d6a933003 /loader
parent22a06c4ae5672c1dd629918d0a279b8af24e35c3 (diff)
parent2aafb808284d74edab6e5320e1114f5c74d5881e (diff)
downloadmpv-c37f09693d0edb632c80f8f38ecdb2faf3547f7f.tar.bz2
mpv-c37f09693d0edb632c80f8f38ecdb2faf3547f7f.tar.xz
Merge svn changes up to r30643
Diffstat (limited to 'loader')
-rw-r--r--loader/dmo/DMO_AudioDecoder.c2
-rw-r--r--loader/win32.c24
2 files changed, 23 insertions, 3 deletions
diff --git a/loader/dmo/DMO_AudioDecoder.c b/loader/dmo/DMO_AudioDecoder.c
index 55a597b2d7..37a32f2923 100644
--- a/loader/dmo/DMO_AudioDecoder.c
+++ b/loader/dmo/DMO_AudioDecoder.c
@@ -29,9 +29,9 @@ struct DMO_AudioDecoder
#include <stdlib.h>
#include "mp_msg.h"
+#include "libmpdemux/aviprint.h"
typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**);
-void print_wave_header(WAVEFORMATEX *h, int verbose_level);
DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf,int out_channels)
//DMO_AudioDecoder * DMO_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf)
diff --git a/loader/win32.c b/loader/win32.c
index 812815e699..39c9d65b05 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -596,6 +596,19 @@ static HMODULE WINAPI expGetModuleHandleA(const char* name)
return result;
}
+static HMODULE WINAPI expGetModuleHandleW(const uint16_t* name)
+{
+ char aname[256];
+ int pos = 0;
+ while (*name) {
+ if (*name > 256 || pos >= sizeof(aname) - 1)
+ return NULL;
+ aname[pos++] = *name++;
+ }
+ aname[pos] = 0;
+ return expGetModuleHandleA(aname);
+}
+
static void* WINAPI expCreateThread(void* pSecAttr, long dwStackSize,
void* lpStartAddress, void* lpParameter,
long dwFlags, long* dwThreadId)
@@ -1335,6 +1348,11 @@ static void WINAPI expInitializeCriticalSection(CRITICAL_SECTION* c)
return;
}
+static void WINAPI expInitializeCriticalSectionAndSpinCount(CRITICAL_SECTION* c, DWORD spin)
+{
+ expInitializeCriticalSection(c);
+}
+
static void WINAPI expEnterCriticalSection(CRITICAL_SECTION* c)
{
#ifdef CRITSECS_NEWTYPE
@@ -4971,6 +4989,7 @@ struct exports exp_kernel32[]=
FF(VirtualAlloc, -1)
FF(VirtualFree, -1)
FF(InitializeCriticalSection, -1)
+ FF(InitializeCriticalSectionAndSpinCount, -1)
FF(EnterCriticalSection, -1)
FF(LeaveCriticalSection, -1)
FF(DeleteCriticalSection, -1)
@@ -5030,6 +5049,7 @@ struct exports exp_kernel32[]=
FF(UnmapViewOfFile, -1)
FF(Sleep, -1)
FF(GetModuleHandleA, -1)
+ FF(GetModuleHandleW, -1)
FF(GetProfileIntA, -1)
FF(GetPrivateProfileIntA, -1)
FF(GetPrivateProfileStringA, -1)
@@ -5516,7 +5536,7 @@ void* LookupExternal(const char* library, int ordinal)
no_dll:
if(pos>150)return 0;
- sprintf(export_names[pos], "%s:%d", library, ordinal);
+ snprintf(export_names[pos], sizeof(export_names[pos]), "%s:%d", library, ordinal);
return add_stub();
}
@@ -5583,7 +5603,7 @@ void* LookupExternalByName(const char* library, const char* name)
no_dll_byname:
if(pos>150)return 0;// to many symbols
- strcpy(export_names[pos], name);
+ snprintf(export_names[pos], sizeof(export_names[pos]), "%s", name);
return add_stub();
}