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
This commit is contained in:
alex
2004-10-12 16:30:40 +00:00
parent a74b7d106c
commit bf45cf730f
+11
View File
@@ -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)
{