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)
|
void* WINAPI expWaitForSingleObject(void* object, int duration)
|
||||||
{
|
{
|
||||||
mutex_list *ml = (mutex_list *)object;
|
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;
|
mutex_list* pp=mlist;
|
||||||
// dbgprintf("WaitForSingleObject(0x%x, duration %d) =>\n",object, duration);
|
// dbgprintf("WaitForSingleObject(0x%x, duration %d) =>\n",object, duration);
|
||||||
do {
|
// loop below was slightly fixed - its used just for checking if
|
||||||
if (pp == NULL) dbgprintf("WaitForSingleObject: NotFound\n");
|
// this object really exists in our list
|
||||||
if((pp->pm, mlist->pm)==0)
|
if (!ml)
|
||||||
break;;
|
return (void*) ret;
|
||||||
}while((pp=pp->prev));
|
while (pp && (pp->pm != ml->pm))
|
||||||
|
pp = pp->prev;
|
||||||
|
if (!pp) {
|
||||||
|
//dbgprintf("WaitForSingleObject: NotFound\n");
|
||||||
|
return (void*)ret;
|
||||||
|
}
|
||||||
|
|
||||||
pthread_mutex_lock(ml->pm);
|
pthread_mutex_lock(ml->pm);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue