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

Commit 254fb3d4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Codec2Buffer: Update 64bit check in asC2Buffer" am: af7b3c2c am: 01d636e0 am: 9edbb6f9

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1684305

Change-Id: I39bd0bf81f3704612de9ba2f2dd4534220031bff
parents a0072208 9edbb6f9
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -679,17 +679,20 @@ GraphicMetadataBuffer::GraphicMetadataBuffer(
std::shared_ptr<C2Buffer> GraphicMetadataBuffer::asC2Buffer() {
#ifdef __LP64__
    static std::once_flag s_checkOnce;
    static bool s_64bitonly {false};
    static bool s_is64bitOk {true};
    std::call_once(s_checkOnce, [&](){
        const std::string abi32list =
        ::android::base::GetProperty("ro.product.cpu.abilist32", "");
        if (abi32list.empty()) {
            s_64bitonly = true;
        if (!abi32list.empty()) {
            int32_t inputSurfaceSetting =
            ::android::base::GetIntProperty("debug.stagefright.c2inputsurface", int32_t(0));
            s_is64bitOk = inputSurfaceSetting != 0;
        }
    });

    if (!s_64bitonly) {
        ALOGE("GraphicMetadataBuffer does not work in 32+64 system if compiled as 64-bit object");
    if (!s_is64bitOk) {
        ALOGE("GraphicMetadataBuffer does not work in 32+64 system if compiled as 64-bit object"\
              "when debug.stagefright.c2inputsurface is set to 0");
        return nullptr;
    }
#endif