[Mplayer-cvslog] CVS: main/loader module.c,1.18,1.19

Roberto Togni CVS syncmail at mplayerhq.hu
Thu Mar 18 23:00:33 CET 2004


CVS change done by Roberto Togni CVS

Update of /cvsroot/mplayer/main/loader
In directory mail:/var2/tmp/cvs-serv15682/loader

Modified Files:
	module.c 
Log Message:
Support for vp5 and vp6 dll decoders
Patch by Reimar Doeffinger


Index: module.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/module.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- module.c	29 Jan 2004 08:37:35 -0000	1.18
+++ module.c	18 Mar 2004 22:00:30 -0000	1.19
@@ -422,6 +422,39 @@
 	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;




More information about the MPlayer-cvslog mailing list