Loading media/codec2/vndk/C2Store.cpp +19 −16 Original line number Original line Diff line number Diff line Loading @@ -661,15 +661,18 @@ c2_status_t C2PlatformComponentStore::ComponentModule::init( ALOGV("in %s", __func__); ALOGV("in %s", __func__); ALOGV("loading dll"); ALOGV("loading dll"); mLibHandle = dlopen(libPath.c_str(), RTLD_NOW|RTLD_NODELETE); mLibHandle = dlopen(libPath.c_str(), RTLD_NOW|RTLD_NODELETE); if (mLibHandle == nullptr) { LOG_ALWAYS_FATAL_IF(mLibHandle == nullptr, // could be access/symbol or simply not being there "could not dlopen %s: %s", libPath.c_str(), dlerror()); ALOGD("could not dlopen %s: %s", libPath.c_str(), dlerror()); mInit = C2_CORRUPTED; } else { createFactory = createFactory = (C2ComponentFactory::CreateCodec2FactoryFunc)dlsym(mLibHandle, "CreateCodec2Factory"); (C2ComponentFactory::CreateCodec2FactoryFunc)dlsym(mLibHandle, "CreateCodec2Factory"); LOG_ALWAYS_FATAL_IF(createFactory == nullptr, "createFactory is null in %s", libPath.c_str()); destroyFactory = destroyFactory = (C2ComponentFactory::DestroyCodec2FactoryFunc)dlsym(mLibHandle, "DestroyCodec2Factory"); (C2ComponentFactory::DestroyCodec2FactoryFunc)dlsym(mLibHandle, "DestroyCodec2Factory"); LOG_ALWAYS_FATAL_IF(destroyFactory == nullptr, "destroyFactory is null in %s", libPath.c_str()); mComponentFactory = createFactory(); mComponentFactory = createFactory(); if (mComponentFactory == nullptr) { if (mComponentFactory == nullptr) { Loading @@ -678,7 +681,7 @@ c2_status_t C2PlatformComponentStore::ComponentModule::init( } else { } else { mInit = C2_OK; mInit = C2_OK; } } } if (mInit != C2_OK) { if (mInit != C2_OK) { return mInit; return mInit; } } Loading Loading
media/codec2/vndk/C2Store.cpp +19 −16 Original line number Original line Diff line number Diff line Loading @@ -661,15 +661,18 @@ c2_status_t C2PlatformComponentStore::ComponentModule::init( ALOGV("in %s", __func__); ALOGV("in %s", __func__); ALOGV("loading dll"); ALOGV("loading dll"); mLibHandle = dlopen(libPath.c_str(), RTLD_NOW|RTLD_NODELETE); mLibHandle = dlopen(libPath.c_str(), RTLD_NOW|RTLD_NODELETE); if (mLibHandle == nullptr) { LOG_ALWAYS_FATAL_IF(mLibHandle == nullptr, // could be access/symbol or simply not being there "could not dlopen %s: %s", libPath.c_str(), dlerror()); ALOGD("could not dlopen %s: %s", libPath.c_str(), dlerror()); mInit = C2_CORRUPTED; } else { createFactory = createFactory = (C2ComponentFactory::CreateCodec2FactoryFunc)dlsym(mLibHandle, "CreateCodec2Factory"); (C2ComponentFactory::CreateCodec2FactoryFunc)dlsym(mLibHandle, "CreateCodec2Factory"); LOG_ALWAYS_FATAL_IF(createFactory == nullptr, "createFactory is null in %s", libPath.c_str()); destroyFactory = destroyFactory = (C2ComponentFactory::DestroyCodec2FactoryFunc)dlsym(mLibHandle, "DestroyCodec2Factory"); (C2ComponentFactory::DestroyCodec2FactoryFunc)dlsym(mLibHandle, "DestroyCodec2Factory"); LOG_ALWAYS_FATAL_IF(destroyFactory == nullptr, "destroyFactory is null in %s", libPath.c_str()); mComponentFactory = createFactory(); mComponentFactory = createFactory(); if (mComponentFactory == nullptr) { if (mComponentFactory == nullptr) { Loading @@ -678,7 +681,7 @@ c2_status_t C2PlatformComponentStore::ComponentModule::init( } else { } else { mInit = C2_OK; mInit = C2_OK; } } } if (mInit != C2_OK) { if (mInit != C2_OK) { return mInit; return mInit; } } Loading