diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-12 16:30:40 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-12 16:30:40 +0000 |
commit | bf45cf730f97e9cc2bd827fcdc2d2301f7da489e (patch) | |
tree | b04f27fdc72bb6fc822104077c95775c912a6cfc /loader/module.c | |
parent | a74b7d106c646bbe6fbca1e66eabf5770a50d03a (diff) | |
download | mpv-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/module.c')
-rw-r--r-- | loader/module.c | 11 |
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) { |