diff options
author | Glenn Kasten <gkasten@google.com> | 2012-10-12 15:59:28 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-10-12 16:00:50 -0700 |
commit | cd91d915dcaa11a4a6136c2554c3af73ea881573 (patch) | |
tree | 7b3e794d18ec49ee0c54b5c3f327d7be17abb537 /media/libstagefright | |
parent | 954f6afed22e8a723ddb9a6448c14bce4e008a9c (diff) | |
download | frameworks_av-cd91d915dcaa11a4a6136c2554c3af73ea881573.zip frameworks_av-cd91d915dcaa11a4a6136c2554c3af73ea881573.tar.gz frameworks_av-cd91d915dcaa11a4a6136c2554c3af73ea881573.tar.bz2 |
Fix log spam: Failed to open libwvm.so
Bug: 7342813
Change-Id: I98852f036e4679a653723fc2bf1435d6e9d7d34c
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/WVMExtractor.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/media/libstagefright/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp index 31b2bcf..5ae80cc 100644 --- a/media/libstagefright/WVMExtractor.cpp +++ b/media/libstagefright/WVMExtractor.cpp @@ -72,15 +72,18 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source) } } -bool WVMExtractor::getVendorLibHandle() +static void init_routine() { - 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; } |