OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
954f6af
)
Fix log spam: Failed to open libwvm.so
author
Glenn Kasten
<gkasten@google.com>
Fri, 12 Oct 2012 22:59:28 +0000
(15:59 -0700)
committer
Glenn Kasten
<gkasten@google.com>
Fri, 12 Oct 2012 23:00:50 +0000
(16:00 -0700)
Bug:
7342813
Change-Id: I98852f036e4679a653723fc2bf1435d6e9d7d34c
media/libstagefright/WVMExtractor.cpp
patch
|
blob
|
history
diff --git
a/media/libstagefright/WVMExtractor.cpp
b/media/libstagefright/WVMExtractor.cpp
index
31b2bcf
..
5ae80cc
100644
(file)
--- a/
media/libstagefright/WVMExtractor.cpp
+++ b/
media/libstagefright/WVMExtractor.cpp
@@
-72,15
+72,18
@@
WVMExtractor::WVMExtractor(const sp<DataSource> &source)
}
}
-
bool WVMExtractor::getVendorLibHandl
e()
+
static void init_routin
e()
{
- if (gVendorLibHandle == NULL) {
- gVendorLibHandle = dlopen("libwvm.so", RTLD_NOW);
- }
-
+ gVendorLibHandle = dlopen("libwvm.so", RTLD_NOW);
if (gVendorLibHandle == NULL) {
ALOGE("Failed to open libwvm.so");
}
+}
+
+bool WVMExtractor::getVendorLibHandle()
+{
+ static pthread_once_t sOnceControl = PTHREAD_ONCE_INIT;
+ pthread_once(&sOnceControl, init_routine);
return gVendorLibHandle != NULL;
}