diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-10-12 16:40:56 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-10-12 16:40:56 +0000 |
commit | 6e1a20c12121d7d09e8a89e358afca057eedd864 (patch) | |
tree | 60e3a8e75278039f0e7fd3da8b1f294a70eecd1f /loader/win32.c | |
parent | ae82b18e79acbfe584181c9b44ea8b4f7f3d3f51 (diff) | |
download | mpv-6e1a20c12121d7d09e8a89e358afca057eedd864.tar.bz2 mpv-6e1a20c12121d7d09e8a89e358afca057eedd864.tar.xz |
fixed 2 10l bugs, ATI VCR2 dll now working
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7719 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/win32.c')
-rw-r--r-- | loader/win32.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/loader/win32.c b/loader/win32.c index 6a129fe396..06d1f7a3e8 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -1243,7 +1243,7 @@ static void WINAPI expInitializeCriticalSection(CRITICAL_SECTION* c) pthread_mutex_init(&cs->mutex, NULL); cs->locked=0; cs->deadbeef = 0xdeadbeef; - *(void**)c = cs + 1; + *(void**)c = cs; } #endif return; @@ -1254,10 +1254,9 @@ static void WINAPI expEnterCriticalSection(CRITICAL_SECTION* c) #ifdef CRITSECS_NEWTYPE struct CRITSECT* cs = critsecs_get_unix(c); #else - struct CRITSECT* cs = (*(struct CRITSECT**)c) - 1; - + struct CRITSECT* cs = (*(struct CRITSECT**)c); #endif - dbgprintf("EnterCriticalSection(0x%x) %p maso:0x%x\n",c, cs, cs->deadbeef); + dbgprintf("EnterCriticalSection(0x%x) %p maso:0x%x\n",c, cs, (cs)?cs->deadbeef:NULL); if (!cs) { dbgprintf("entered uninitialized critisec!\n"); @@ -1265,7 +1264,7 @@ static void WINAPI expEnterCriticalSection(CRITICAL_SECTION* c) #ifdef CRITSECS_NEWTYPE cs=critsecs_get_unix(c); #else - cs = (*(struct CRITSECT**)c) - 1; + cs = (*(struct CRITSECT**)c); #endif printf("Win32 Warning: Accessed uninitialized Critical Section (%p)!\n", c); } @@ -1282,7 +1281,7 @@ static void WINAPI expLeaveCriticalSection(CRITICAL_SECTION* c) #ifdef CRITSECS_NEWTYPE struct CRITSECT* cs = critsecs_get_unix(c); #else - struct CRITSECT* cs = (*(struct CRITSECT**)c) - 1; + struct CRITSECT* cs = (*(struct CRITSECT**)c); #endif // struct CRITSECT* cs=(struct CRITSECT*)c; dbgprintf("LeaveCriticalSection(0x%x) 0x%x\n",c, cs->deadbeef); @@ -1300,7 +1299,7 @@ static void WINAPI expDeleteCriticalSection(CRITICAL_SECTION *c) #ifdef CRITSECS_NEWTYPE struct CRITSECT* cs = critsecs_get_unix(c); #else - struct CRITSECT* cs= (*(struct CRITSECT**)c) - 1; + struct CRITSECT* cs= (*(struct CRITSECT**)c); #endif // struct CRITSECT* cs=(struct CRITSECT*)c; dbgprintf("DeleteCriticalSection(0x%x)\n",c); |