Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 588ddb06 authored by Jiyong Park's avatar Jiyong Park
Browse files

use android_load_library instead of dlopen when loading vendor lib

libstagefright_omx.so dlopens libstagefrighthw.so. Since the former is
owned by platform and the latter is a vendor lib, they has to be loaded
into different linker namespaces. However, since the former was using
the plain dlopen() for loading the latter, they had to be loaded into
the same namespace; dlopen() tries to load the requested library into
the namespace of the caller.

In order to load the former and the latter into different namespaces,
dlopen() is changed to android_load_sphal_library() which internally
uses android_dlopen_ext() to explicitly select the linker namespace from
which the requested lib is loaded.

Bug: 63878960
Test: camcorder recording works
Test: lsof -p <pid_of_mediacodec> shows libstagefrighthw.so
Change-Id: I6f2dc11ba6289a37fc8ab82787757aa3bb52e42b
parent 3a52d183
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment