diff options
author | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-18 22:00:31 +0000 |
---|---|---|
committer | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-18 22:00:31 +0000 |
commit | 1fac9f9861d6ebc41d4028948386d3fdab0de260 (patch) | |
tree | 58c31761fdb497da3b6fada764ee32a920bbe025 /loader | |
parent | e8a1b371302278226a011eb45490d0542bbc6ae3 (diff) | |
download | mpv-1fac9f9861d6ebc41d4028948386d3fdab0de260.tar.bz2 mpv-1fac9f9861d6ebc41d4028948386d3fdab0de260.tar.xz |
Support for vp5 and vp6 dll decoders
Patch by Reimar Doeffinger
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12043 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r-- | loader/module.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/loader/module.c b/loader/module.c index 29d31ad1bd..da6e1edbb9 100644 --- a/loader/module.c +++ b/loader/module.c @@ -422,6 +422,39 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags) if (!wm) printf("Win32 LoadLibrary failed to load: %s\n", checked); + // remove a few divs in the VP codecs that make trouble + if (strstr(libname,"vp5vfw.dll") && wm) + { + int i; + if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==(void*)0x10003930) { + for (i=0;i<3;i++) ((char*)0x10004e86)[i]=0x90; + for (i=0;i<3;i++) ((char*)0x10005a23)[i]=0x90; + for (i=0;i<3;i++) ((char*)0x10005bff)[i]=0x90; + } else { + fprintf(stderr, "Unsupported VP5 version\n"); + return 0; + } + } + + if (strstr(libname,"vp6vfw.dll") && wm) + { + int i; + if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==(void*)0x10003ef0) { + // looks like VP 6.1.0.2 + for (i=0;i<6;i++) ((char*)0x10007268)[i]=0x90; + for (i=0;i<6;i++) ((char*)0x10007e83)[i]=0x90; + for (i=0;i<6;i++) ((char*)0x1000806a)[i]=0x90; + } else if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==(void*)0x10004120) { + // looks like VP 6.2.0.10 + for (i=0;i<6;i++) ((char*)0x10007688)[i]=0x90; + for (i=0;i<6;i++) ((char*)0x100082c3)[i]=0x90; + for (i=0;i<6;i++) ((char*)0x100084aa)[i]=0x90; + } else { + fprintf(stderr, "Unsupported VP6 version\n"); + return 0; + } + } + if (strstr(libname,"QuickTime.qts") && wm) { void** ptr; |