mirror of https://github.com/mpv-player/mpv
Applies kabis changes to avifile 0.6 cvs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@719 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
314ca124e9
commit
893a00d913
|
@ -584,15 +584,19 @@ void* WINAPI expResetEvent(void* event)
|
|||
void* WINAPI expWaitForSingleObject(void* object, int duration)
|
||||
{
|
||||
mutex_list *ml = (mutex_list *)object;
|
||||
int ret=0x12345678; // fixed by Zdenek Kabelac
|
||||
int ret=WAIT_FAILED; // fixed by Zdenek Kabelac
|
||||
mutex_list* pp=mlist;
|
||||
// dbgprintf("WaitForSingleObject(0x%x, duration %d) =>\n",object, duration);
|
||||
do {
|
||||
if (pp == NULL) dbgprintf("WaitForSingleObject: NotFound\n");
|
||||
if((pp->pm, mlist->pm)==0)
|
||||
break;;
|
||||
}while((pp=pp->prev));
|
||||
|
||||
// loop below was slightly fixed - its used just for checking if
|
||||
// this object really exists in our list
|
||||
if (!ml)
|
||||
return (void*) ret;
|
||||
while (pp && (pp->pm != ml->pm))
|
||||
pp = pp->prev;
|
||||
if (!pp) {
|
||||
//dbgprintf("WaitForSingleObject: NotFound\n");
|
||||
return (void*)ret;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(ml->pm);
|
||||
|
||||
|
|
Loading…
Reference in New Issue