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

Commit 1276efd3 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

stagefright: move all codecs into codec process unless excluded

This policy can be turned off by setting the media.stagefright.less-secure
system property to true.

Bug: 22775369
Change-Id: I3f4ff780a615c7fd5fede0ad94c044aec79c7686
parent 70bdd112
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -207,12 +207,14 @@ bool MuxOMX::isLocalNode_l(node_id node) const {
// static
MuxOMX::node_location MuxOMX::getPreferredCodecLocation(const char *name) {
    if (sCodecProcessEnabled) {
        // all codecs go to codec process unless excluded using system property, in which case
        // all non-secure decoders, OMX.google.* codecs and encoders can go in the codec process
        // (non-OMX.google.* encoders can be excluded using system property.)
        if ((strcasestr(name, "decoder")
                        && strcasestr(name, ".secure") != name + strlen(name) - 7)
                || (strcasestr(name, "encoder")
                        && !property_get_bool("media.stagefright.legacyencoder", false))
                || !property_get_bool("media.stagefright.less-secure", false)
                || !strncasecmp(name, "OMX.google.", 11)) {
            return CODECPROCESS;
        }