Mercurial > mplayer.hg
comparison loader/module.c @ 12042:ebea9d9163b0
Support for vp5 and vp6 dll decoders
Patch by Reimar Doeffinger
author | rtognimp |
---|---|
date | Thu, 18 Mar 2004 22:00:31 +0000 |
parents | 711e584107af |
children | ef68b86beaf4 |
comparison
equal
deleted
inserted
replaced
12041:c5aa951feff8 | 12042:ebea9d9163b0 |
---|---|
419 } | 419 } |
420 } | 420 } |
421 | 421 |
422 if (!wm) | 422 if (!wm) |
423 printf("Win32 LoadLibrary failed to load: %s\n", checked); | 423 printf("Win32 LoadLibrary failed to load: %s\n", checked); |
424 | |
425 // remove a few divs in the VP codecs that make trouble | |
426 if (strstr(libname,"vp5vfw.dll") && wm) | |
427 { | |
428 int i; | |
429 if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==(void*)0x10003930) { | |
430 for (i=0;i<3;i++) ((char*)0x10004e86)[i]=0x90; | |
431 for (i=0;i<3;i++) ((char*)0x10005a23)[i]=0x90; | |
432 for (i=0;i<3;i++) ((char*)0x10005bff)[i]=0x90; | |
433 } else { | |
434 fprintf(stderr, "Unsupported VP5 version\n"); | |
435 return 0; | |
436 } | |
437 } | |
438 | |
439 if (strstr(libname,"vp6vfw.dll") && wm) | |
440 { | |
441 int i; | |
442 if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==(void*)0x10003ef0) { | |
443 // looks like VP 6.1.0.2 | |
444 for (i=0;i<6;i++) ((char*)0x10007268)[i]=0x90; | |
445 for (i=0;i<6;i++) ((char*)0x10007e83)[i]=0x90; | |
446 for (i=0;i<6;i++) ((char*)0x1000806a)[i]=0x90; | |
447 } else if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==(void*)0x10004120) { | |
448 // looks like VP 6.2.0.10 | |
449 for (i=0;i<6;i++) ((char*)0x10007688)[i]=0x90; | |
450 for (i=0;i<6;i++) ((char*)0x100082c3)[i]=0x90; | |
451 for (i=0;i<6;i++) ((char*)0x100084aa)[i]=0x90; | |
452 } else { | |
453 fprintf(stderr, "Unsupported VP6 version\n"); | |
454 return 0; | |
455 } | |
456 } | |
424 | 457 |
425 if (strstr(libname,"QuickTime.qts") && wm) | 458 if (strstr(libname,"QuickTime.qts") && wm) |
426 { | 459 { |
427 void** ptr; | 460 void** ptr; |
428 void *dispatch_addr; | 461 void *dispatch_addr; |