summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-12 16:30:40 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-12 16:30:40 +0000
commitbf45cf730f97e9cc2bd827fcdc2d2301f7da489e (patch)
treeb04f27fdc72bb6fc822104077c95775c912a6cfc /loader
parenta74b7d106c646bbe6fbca1e66eabf5770a50d03a (diff)
downloadmpv-bf45cf730f97e9cc2bd827fcdc2d2301f7da489e.tar.bz2
mpv-bf45cf730f97e9cc2bd827fcdc2d2301f7da489e.tar.xz
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13622 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r--loader/module.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/loader/module.c b/loader/module.c
index 875546b804..206fb7435a 100644
--- a/loader/module.c
+++ b/loader/module.c
@@ -422,6 +422,17 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
if (!wm)
printf("Win32 LoadLibrary failed to load: %s\n", checked);
+ if (strstr(libname,"vp31vfw.dll") && wm)
+ {
+ int i;
+
+ // sse hack moved from patch dll into runtime patching
+ if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==(void*)0x10001000) {
+ fprintf(stderr, "VP3 DLL found\n");
+ for (i=0;i<18;i++) ((char*)0x10004bd6)[i]=0x90;
+ }
+ }
+
// remove a few divs in the VP codecs that make trouble
if (strstr(libname,"vp5vfw.dll") && wm)
{