diff options
Diffstat (limited to 'libstagefrighthw/QComOMXPlugin.cpp')
-rwxr-xr-x | libstagefrighthw/QComOMXPlugin.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libstagefrighthw/QComOMXPlugin.cpp b/libstagefrighthw/QComOMXPlugin.cpp index 9446dcf6..7f8933ba 100755 --- a/libstagefrighthw/QComOMXPlugin.cpp +++ b/libstagefrighthw/QComOMXPlugin.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 The Android Open Source Project + * Copyright (c) 2014, The Linux Foundation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +49,12 @@ QComOMXPlugin::QComOMXPlugin() (GetRolesOfComponentFunc)dlsym( mLibHandle, "OMX_GetRolesOfComponent"); - (*mInit)(); + if (!mInit || !mDeinit || !mComponentNameEnum || !mGetHandle || + !mFreeHandle || !mGetRolesOfComponentHandle) { + dlclose(mLibHandle); + mLibHandle = NULL; + } else + (*mInit)(); } } |