mirror of
https://github.com/mpv-player/mpv
synced 2025-01-29 03:02:53 +00:00
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26419 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8fd56cbb88
commit
339a79e1c3
@ -204,8 +204,7 @@ static int load_syms_windows(char *path) {
|
|||||||
rv_handle = handle;
|
rv_handle = handle;
|
||||||
#ifndef WIN32_LOADER
|
#ifndef WIN32_LOADER
|
||||||
{
|
{
|
||||||
// drv43260.dll
|
if (strstr(path, "drv34260.dll")) {
|
||||||
if (wrvyuv_transform == (void *)0x634114d0) {
|
|
||||||
int patched;
|
int patched;
|
||||||
// patch away multithreaded decoding, it causes crashes
|
// patch away multithreaded decoding, it causes crashes
|
||||||
static const uint8_t oldcode[13] = {
|
static const uint8_t oldcode[13] = {
|
||||||
@ -215,7 +214,7 @@ static int load_syms_windows(char *path) {
|
|||||||
0x31, 0xc0,
|
0x31, 0xc0,
|
||||||
0x89, 0x83, 0xf8, 0x05, 0x00, 0x00,
|
0x89, 0x83, 0xf8, 0x05, 0x00, 0x00,
|
||||||
0xe9, 0xd0, 0x00, 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));
|
sizeof(oldcode));
|
||||||
if (!patched)
|
if (!patched)
|
||||||
mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Could not patch Real codec, this might crash on multi-CPU systems\n");
|
mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Could not patch Real codec, this might crash on multi-CPU systems\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user