Fixed playerMutex not being released sometimes (bug from last commit)
This commit is contained in:
parent
65c1715269
commit
c2d5d4000d
|
|
@ -1226,12 +1226,14 @@ static void AudioQueueIsRunningCallbackProc(void* userData, AudioQueueRef audioQ
|
|||
|
||||
if (entry == nil)
|
||||
{
|
||||
pthread_mutex_unlock(&playerMutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
double retval = [entry duration];
|
||||
|
||||
pthread_mutex_unlock(&playerMutex);
|
||||
pthread_mutex_unlock(&playerMutex);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
@ -1252,6 +1254,13 @@ static void AudioQueueIsRunningCallbackProc(void* userData, AudioQueueRef audioQ
|
|||
|
||||
QueueEntry* entry = currentlyPlayingEntry;
|
||||
|
||||
if (entry == nil)
|
||||
{
|
||||
pthread_mutex_unlock(&playerMutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
double retval = [entry progress];
|
||||
|
||||
pthread_mutex_unlock(&playerMutex);
|
||||
|
|
@ -2143,6 +2152,8 @@ static void AudioQueueIsRunningCallbackProc(void* userData, AudioQueueRef audioQ
|
|||
|
||||
if (entry == nil)
|
||||
{
|
||||
pthread_mutex_unlock(&playerMutex);
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue