Mercurial > mplayer.hg
changeset 26387:49715c7705d1
Dlls can be relocated when loading so rely on filename instead of absolute
address to check if it's drv43260.dll and hence needs patching.
author | zuxy |
---|---|
date | Sat, 12 Apr 2008 18:29:57 +0000 |
parents | cf87699fba0b |
children | a630c8945001 |
files | libmpcodecs/vd_realvid.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_realvid.c Sat Apr 12 18:24:25 2008 +0000 +++ b/libmpcodecs/vd_realvid.c Sat Apr 12 18:29:57 2008 +0000 @@ -204,8 +204,7 @@ rv_handle = handle; #ifndef WIN32_LOADER { - // drv43260.dll - if (wrvyuv_transform == (void *)0x634114d0) { + if (strstr(path, "drv34260.dll")) { int patched; // patch away multithreaded decoding, it causes crashes static const uint8_t oldcode[13] = { @@ -215,7 +214,7 @@ 0x31, 0xc0, 0x89, 0x83, 0xf8, 0x05, 0x00, 0x00, 0xe9, 0xd0, 0x00, 0x00, 0x00 }; - patched = patch_dll((void *)0x634132fa, oldcode, newcode, + patched = patch_dll((char*)wrvyuv_transform + 0x634132fa - 0x634114d0, oldcode, newcode, sizeof(oldcode)); if (!patched) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Could not patch Real codec, this might crash on multi-CPU systems\n");