Media Kit: fix use of pthread_once_init in FormatManager.cpp

Signed-off-by: Adrien Destugues <[email protected]>
This commit is contained in:
Jessica Hamilton
2014-04-04 22:25:46 +02:00
committed by Adrien Destugues
parent 8bbdad1487
commit 6242374090
+2 -3
View File
@@ -129,7 +129,7 @@ FormatManager::FormatManager()
}
pthread_once_t FormatManager::sInitOnce;
pthread_once_t FormatManager::sInitOnce = PTHREAD_ONCE_INIT;
FormatManager* FormatManager::sInstance = NULL;
@@ -143,8 +143,7 @@ FormatManager::CreateInstance()
/* static */ FormatManager*
FormatManager::GetInstance()
{
if (sInstance == NULL)
pthread_once(&sInitOnce, &CreateInstance);
pthread_once(&sInitOnce, &CreateInstance);
return sInstance;
}